It was narrated from Abu Hurairah that the Prophet (ﷺ) said:
When the call for the prayer is given, the Shaitan takes to his heels, passing wind loudly so that he will not hear the call to prayer. When the call to prayer is finished, he comes back. And when the Iqamah is said, he again takes to his heels, and after it is completed, he returns again to interfere between the (praying) person and his heart, saying to him: 'Remember such and such, remember such and such,' - things that he had not remembered - until he does not know how many (Rak'ahs) he has prayed.