Abu Hurairah reported,

He traced it back to the Prophet ﷺ, who said, "Satan comes to one of you while he is in his prayer and confuses him until he no longer knows how many units he has prayed. Whoever experiences any of that, let him perform two prostrations while seated."

Ahmad 7286

Sahih

حدثنا سفيان عن الزهري عن أبي سلمة

عن أبي هريرة

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

أحمد 7286صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abu Hurairah
Numbering
Darussalam 7286
Ahmad 7286