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."
حدثنا سفيان بن وكيع حدثنا يونس بن بكير حدثنا ابن إسحق أخبرني سلمة بن صفوان بن سلمة عن أبي سلمة
أن النبي ﷺ قال إن الشيطان يدخل بين ابن آدم وبين نفسه فلا يدري كم صلى فإذا وجد ذلك فليسجد سجدتين قبل أن يسلم