The Messenger of Allah ﷺ said, "When the call to prayer is made, Satan turns and flees, passing wind so that he does not hear the adhan. When the adhan is finished, he returns. When the iqamah is called, he flees again, and when the iqamah is completed, he returns and comes between a man and his own thoughts, saying, 'Remember this and that,' reminding him of things he had not been thinking about, until the man no longer knows how much he has prayed. So if any of you does not know how much he has prayed, whether three or four, let him perform two prostrations while seated."
قال رسول الله ﷺ: إذا نودي بالصلاة أدبر الشيطان وله ضراط حتى لا يسمع الأذان، فإذا قضي الأذان أقبل، فإذا ثوب بها أدبر، فإذا قضي التثويب أقبل حتى يخطر بين المرء ونفسه، يقول: أذكر كذا وكذا- ما لم يكن يذكر- حتى يظل الرجل إن يدري كم صلى، فإذا لم يذر أحدكم كم صلى- ثلاثا أو أربعا-فليسجد سجدتين وهو جالس.
Bukhari narrated it in the chapter on forgetfulness (1231), and Muslim in the chapter on mosques (83, the smaller number), both by way of Hisham bin Abu Abdullah Dastawai, from Yahya bin Abu Kathir, from Abu Salama bin Abdul-Rahman, from Abu Hurairah, mentioning the same account, and their wording is identical.Muslim also narrated it from another route, adding, "He then aroused his hopes and desires, and reminded him of matters he would not otherwise have brought to mind."As for the phrase "he does not know," the word "in" here is a negation, meaning "not."As for the phrase "aroused his hopes," it means he mentioned wishes to him, and "desires" means he presented wishes before him. What is meant by this is what occurs to a person during his prayer in the way of inner thoughts and Satan's false promises.As for the word "thawwaba," tathwib in prayer means establishing it and calling for it.Jami al-Usul (5/548).