Abu Hurairah reported,

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

Nasai 1253

Sahih

أخبرنا قتيبة عن مالك عن ابن شهاب عن أبي سلمة

عن أبي هريرة

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

النسائي 1253صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Forgetfulness
Chapter
Seeking the most correct direction
Numbering
Darussalam 1253
Nasai 1253