Praise be to Allah.
Whoever makes a vow to do an act of worship such as praying, fasting, giving charity etc must fulfil that vow, because the Prophet (peace and blessings of Allaah be upon him) said: “Whoever vows to obey Allaah, let him do so, and whoever vows to disobey Allaah, let him not do so.” Narrated by al-Bukhaari, 6318. This applies whether the vow was connected to something happening or was made in general terms.
Ibn Qudaamah (may Allaah have mercy on him) said concerning a vow to do an act of worship:
These vows are of three types, one of which is obliging oneself to do an act of worship in return for a blessing which one hopes to have or a harmful thing which one seeks to ward off, such as when a person says, “If Allaah heals me then I will fast one month for Allaah.” In this case the act of worship is something which is basically obligatory according to sharee’ah, such as prayer, fasting, charity and Hajj. This vow must be fulfilled according to scholarly consensus.
If you can remember what you vowed to do – such as praying, fasting or giving charity – but you do not know how much you said you would do, then you have to try your best, and do whatever you think is most likely, so that you will have fulfilled your obligations.
But if you have forgotten or are uncertain as to whether what you vowed to do was praying or fasting or giving charity, then in this case some of the scholars are of the view that you must do your best to do one of them, and some are of the view that what you must do is to offer kafaarat yameen, for each vow of which you are uncertain. Mughni al-Muhtaaj, 6/234; Ghamz ‘Uyoon al-Basaa’ir, 1/211; al-Mawsoo’ah al-Fiqhiyyah, 26/201.
Hence you will know the answer to your second question. A vow to offer a prayer must be fulfilled, so you must do whatever you think is most likely to discharge your obligation. If you are uncertain as to whether you vowed to do twenty prayers or twenty-five, then do twenty-five.
It should be noted that we should not make vows, because of the report narrated by al-Bukhaari (6608) and Muslim (1639) from Ibn ‘Umar (may Allaah be pleased with him) who said: The Prophet (peace and blessings of Allaah be upon him) disallowed making vows and said: “They do not change anything, all they do is make a miser give [in charity].”
And al-Bukhaari (6609) narrated from Abu Hurayrah that the Prophet (peace and blessings of Allaah be upon him) said: “Allaah says: ‘A vow does not bring the son of Adam anything that I have not decreed for him, but his vow may coincide with what has been decreed for him, and in this way I cause a miser to spend of his wealth.’”
And Allaah knows best.