Book 6: When a person forgets whether he has offered three or four Rak'a
Sahih al-Bukhari
Sahih al-Bukhari 1231
Mu'adh bin Fadalah narrated to us, (he said:) Hisham bin Abi Abdullah Dastawa'i told us. He narrated from Yahya bin Kathir, Yahya from Abu Salamah, Abu Salamah from Hazrat Abu Hurairah (ra), that he said: The Messenger of Allah (saw) said: “When the call is made for the prayer (Salat), Satan turns his back and goes away breaking wind, so that he may not hear the call to prayer (Adhan). When the call to prayer is over, he comes back. Then, when the rows are straightened at the Iqamah, he turns his back and goes off. Then, when the worshipper faces the Qiblah and begins the prayer, he comes back, so that he may cast evil whisperings between the man and his own self. He says: Remember this, remember that, and he reminds him of such things as he would never have remembered. At last the man's state becomes such that he does not know how many Rak'ahs he has prayed. If one of you does not know how many Rak'ahs he has prayed, three or four, he should make the prostrations while sitting.”
AI-translated by Islam-Today