The Sufficient (Vol 3) · Hadith 1356 (#Ḥadīth #4)
Chapter 40 | Mistakes in Salah (Prayer) of Three or Four Rak‘at
4ـ عَلِيُّ بْنُ إِبْرَاهِيمَ عَنْ مُحَمَّدِ بْنِ عِيسَى عَنْ يُونُسَ عَنِ ابْنِ مُسْكَانَ عَنِ ابْنِ أَبِي يَعْفُورٍ قَالَ سَأَلْتُ أَبَا عَبْدِ الله (عَلَيْهِ الْسَّلام) عَنِ الرَّجُلِ لاَ يَدْرِي رَكْعَتَيْنِ صَلَّى أَمْ أَرْبَعاً قَالَ يَتَشَهَّدُ وَيُسَلِّمُ ثُمَّ يَقُومُ فَيُصَلِّي رَكْعَتَيْنِ وَأَرْبَعَ سَجَدَاتٍ يَقْرَأُ فِيهِمَا بِفَاتِحَةِ الْكِتَابِ ثُمَّ يَتَشَهَّدُ وَيُسَلِّمُ وَإِنْ كَانَ صَلَّى أَرْبَعاً كَانَتْ هَاتَانِ نَافِلَةً وَإِنْ كَانَ صَلَّى رَكْعَتَيْنِ كَانَتْ هَاتَانِ تَمَامَ الأرْبَعِ وَإِنْ تَكَلَّمَ فَلْيَسْجُدْ سَجْدَتَيِ السَّهْوِ.
4. Ali ibn Ibrahim has narrated from Muhammad ibn ’Isma‘il from Yunus from ibn Muskan from ibn abu Ya‘fur who has said the following: “I once asked abu ‘Abd Allah , about a man who does not know if he has performed two Rak‘at or four. He (the Imam) said, ‘He says Tashahhud (testimonies of belief) and the phrase of offering greeting of peace, then stands up to perform two Rak‘at and four Sujud (prostrations) in which he reads al-Fatihah al-Kitab, thereafter says Tashahhud (testimonies of belief) and the phrase of offering greeting of peace. If he has, in fact, performed four Rak‘at, the two Rak‘at are optional; but if they were two Rak‘at, then these two Rak‘at complete the four, and if he has spoken something other than what is part of Salah (prayer) he performs two Sajdah (prostrations) because of mistake.’”
Gradings are classical jarḥ-wa-taʿdīl, name-matched to a rijāl index (not individually re-verified).