Sahih al-Bukhari #1232 · Forgetfulness in Prayer

Sahih al-BukhariAbu Hurayra
Sahih al-Bukhari · Book 22 · Forgetfulness in Prayer
Sahih al-Bukhari · كتاب 22 · كتاب السهو
Allah's Messenger (ﷺ) said, "When anyone of you stands for the prayers, Satan comes and puts him in doubts till he forgets how many rak'at he has prayed. So if this happens to anyone of you, he should perform two prostrations of Sahu while sitting
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، أَخْبَرَنَا مَالِكٌ، عَنِ ابْنِ شِهَابٍ، عَنْ أَبِي سَلَمَةَ بْنِ عَبْدِ الرَّحْمَنِ، عَنْ أَبِي هُرَيْرَةَ ـ رضى الله عنه ـ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏
"‏ إِنَّ أَحَدَكُمْ إِذَا قَامَ يُصَلِّي جَاءَ الشَّيْطَانُ فَلَبَسَ عَلَيْهِ حَتَّى لاَ يَدْرِيَ كَمْ صَلَّى، فَإِذَا وَجَدَ ذَلِكَ أَحَدُكُمْ فَلْيَسْجُدْ سَجْدَتَيْنِ وَهُوَ جَالِسٌ ‏"‏‏.‏
Reference : Sahih al-Bukhari 1232In-book reference : Book 22, Hadith 10