Sunan Ibn Majah – Hadith No : 1261

‘Iyadnarrated that he asked Abu Sa’eed Al-Khudri: “One of us praysandhe does not know how many (Rak’ah) he has prayed.” He said: “TheMessenger of Allah (ﷺ) said: ‘When anyone of you prays and doesnotknow how many he has prayed, let him perform two prostrationswhile heis sitting.’”

Hadith In Arabic Text :

حدثنا عمرو بن رافع، حدثنا إسماعيل ابن علية، عن هشام، حدثني يحيى، حدثني عياض، أنه سأل أبا سعيد الخدري فقال أحدنا يصلي فلا يدري كم صلى ‏.‏ فقال قال رسول الله صلى الله عليه وسلم ‏”‏ إذا صلى أحدكم فلم يدر كم صلى فليسجد سجدتين وهو جالس ‏”‏ ‏.‏

Chapter : Establishing the Prayer and the Sunnah Regarding Them – كتاب إقامة الصلاة والسنة فيها