Abu Hurairah reported,

The Messenger of Allah ﷺ said, "When one of you stands to pray, Satan comes to him and confuses him until he does not know how much he has prayed. So when one of you experiences this, let him perform two prostrations while he is sitting."

Azami 2469

Sahih

عن أبي هريرة

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

الأعظمي 2469صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Forgetfulness
Section
Two prostrations for forgetfulness and building upon certainty
Numbering
Jami al-Kamil 2469 (2nd edition)
Azami 2469