Sayyidah Maymunah bint Sa'd (may Allah be pleased with her) says that she said: "O Messenger of Allah! Tell us the ruling about a man who becomes forgetful in his prayer and does not know how much he has prayed." The Prophet (peace and blessings be upon him) said: "He should not end the prayer; he should stand in the prayer until he knows how much he has prayed, for these are whisperings that keep presenting themselves and make a person heedless of his prayer."
Al-Tabarani recorded it in al-Mu'jam al-Kabir, and its chain contains majhul (unknown) narrators.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الصلاة / 2914