Abu Hurairah reported,

The Prophet ﷺ said, "Satan comes between a son of Adam and his own soul so that he does not know how many units of prayer he has performed. When anyone of you finds this happening, let him perform two prostrations before giving the closing salutation."

Ibn Majah 1217

Hasan

حدثنا سفيان بن وكيع حدثنا يونس بن بكير حدثنا ابن إسحق أخبرني سلمة بن صفوان بن سلمة عن أبي سلمة

عن أبي هريرة

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

ابن ماجه 1217حسن
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Establishing prayer and the sunnah regarding it
Chapter
Prostrations of forgetfulness before the salam
Numbering
Darussalam 1217
Ibn Majah 1217