Abu Hurairah reported,

The Messenger of Allah ﷺ said, "When one of you stands to pray, Satan comes and confuses him until he no longer knows how much he has prayed. When any of you experiences this, let him perform two prostrations while sitting."

Bukhari 1232

Sahih

حدثنا عبد الله بن يوسف أخبرنا مالك عن ابن شهاب عن أبي سلمة بن عبد الرحمن

عن أبي هريرة رضي الله عنه

أن رسول الله ﷺ قال إن أحدكم إذا قام يصلي جاء الشيطان فلبس عليه حتى لا يدري كم صلى فإذا وجد ذلك أحدكم فليسجد سجدتين وهو جالس

البخاري 1232صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Forgetfulness
Chapter
Forgetfulness in obligatory and voluntary prayers
Numbering
Darussalam 1232
Bukhari 1232