The Messenger of Allah ﷺ said, "When the call to prayer is made, Satan turns and flees, breaking wind so that he does not hear the call. Once the call is finished, he returns. Then when the iqamah is announced, he turns away again, and once the iqamah is completed, he comes back and intrudes between a man and his own soul, saying, 'Remember this, remember that,' bringing to mind things the man had not been thinking of, until the man no longer knows how much he has prayed."
أخبرنا قتيبة عن مالك عن أبي الزناد عن الأعرج
أن رسول الله ﷺ قال إذا نودي للصلاة أدبر الشيطان وله ضراط حتى لا يسمع التأذين فإذا قضي النداء أقبل حتى إذا ثوب بالصلاة أدبر حتى إذا قضي التثويب أقبل حتى يخطر بين المرء ونفسه يقول اذكر كذا اذكر كذا لما لم يكن يذكر حتى يظل المرء إن يدري كم صلى
Bukhari transmitted it in the Book of Adhan, Chapter on the Merit of Calling the Adhan, hadith no. 608, from the hadith of Malik through this chain, and it is found in Muwatta (Yahya): 1/69, and in Kubra, hadith no. 1634. Muslim also transmitted it, hadith no. 19/389, through another route from Abu Zinad through this chain.