Sunan an-Nasa'i 1252
سنن النسائي#1252SahihIt was narrated from Abu Hurairah that:The Messenger of Allah (ﷺ) said: "When any one of you gets up and prays, the Shaitan comes to him an confuses him until he does not know how many (Rak'ahs) he prayed. If any one of you notices that, let him prostrate twice when he is sitting
Scholarly Authentication
We show the most cautious grade (weakest-wins) as the overall label. Individual scholars graded it as follows:
Abu GhuddahSahih
Al-AlbaniSahih
Zubair Ali ZaiSahih - Agreed Upon
In-book reference: 13:74