Muwatta Malik, Book 4, Hadith 223 (In-Book) ⓘ
Yahya related to me from Malik from Ibn Shihab from Abu Salama ibn Abdar-Rahman ibn Awf from Abu Hurayra that the Messenger of Allah, may Allah bless him and grant him peace, said, "When you stand in prayer, Shaytan comes to you and confuses you until you do not know how much you have prayed. If you find that happening do two sajdas from the sitting position."
حَدَّثَنِي يَحْيَى، عَنْ مَالِكٍ، عَنِ ابْنِ شِهَابٍ، عَنْ أَبِي سَلَمَةَ بْنِ عَبْدِ الرَّحْمَنِ بْنِ عَوْفٍ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " إِنَّ أَحَدَكُمْ إِذَا قَامَ يُصَلِّي جَاءَهُ الشَّيْطَانُ فَلَبَسَ عَلَيْهِ حَتَّى لاَ يَدْرِي كَمْ صَلَّى فَإِذَا وَجَدَ ذَلِكَ أَحَدُكُمْ فَلْيَسْجُدْ سَجْدَتَيْنِ وَهُوَ جَالِسٌ " .
also referenced under: Book 4, Hadith 1 (USC-MSA)