Hadith 1656
Musnad of 'Abdur-Rahman bin 'Awf az-Zuhri
It was narrated from Ibn "Abbas (رضي الله عنه) that "Umar (رضي الله عنه) said to him:
O boy, did you hear from the Messenger of Allah (ﷺ) or from one of his Companions anything about what a man should do if he is not sure about his prayer? Whilst he was saying that, ‘Abdur-Rahman bin "Awf came and said: What are you talking about? "Umar said: I asked this boy whether he heard anything from the Messenger of Allah (ﷺ) or from one of his Companions about what a man should do if he is not sure about his prayer. ‘Abdur-Rahman said: I heard the Messenger of Allah (ﷺ) say: “If one of you is not sure about his prayer and does not know whether he prayed one or two [rak"ahs], let him assume it is one: and if he does not know whether he prayed two or three, let him assume that it is two; and if he does not know whether he prayed three or four, let him assume that it is three; then let him prostrate twice when he finishes his prayer, whilst he is still sitting, before he says the salam."
Hadith gradings, numbering and translations can differ between editions. For legal rulings or detailed interpretation, consult qualified scholarship and the referenced edition.