The second is the view of al-Khiraqī and Abū Muhammad, who said that it is the well-known position reported from Ahmad.
The third is the view of many earlier and later scholars. It is reported from ʿAlī, Ibn Masʿūd and others, and is the position of Abū Hanīfah and his followers when forgetfulness recurs.
Ahmad said, as reported by al-Athram: “There is a distinction between exercising judgment and proceeding on the basis of certainty. The hadith of ʿAbd al-Rahmān ibn ʿAwf states: ‘If he does not know whether he has prayed three units or two, he should count them as two.’”
He said: “This person has acted on what is certain and proceeded on that basis. By contrast, someone who exercises his judgment has prayed three units, but a doubt enters his heart that he has prayed only two, although my stronger impression is that he has prayed three. Some misgiving has entered his heart, so he exercises his judgment to determine which possibility is most likely correct, and performs the prostrations after the concluding salutation.” He said: “Thus, there is a distinction between the two.”
I say: The hadith of ʿAbd al-Rahmān ibn ʿAwf mentioned by Ahmad is comparable to the hadith of Abū Saʿīd. It is recorded in the Sunan collections, and al-Tirmidhī and others have graded both hadiths authentic.
ʿAbd al-Rahmān ibn ʿAwf reported that the Messenger of Allah, may Allah bless him and grant him peace, said:
“If any of you has doubts during his prayer and does not know whether he has prayed too many units or too few, then, if he doubts whether he has prayed one or two, let him count them as one. If he does not know whether he has prayed two or three, let him count them as two. If he does not know whether he has prayed three or four, let him count them as three, so that the doubt concerns only an additional unit. Then let him perform two prostrations while seated, before giving the concluding salutation, and then give the salutation.”