[Machine] The Messenger of Allah ﷺ said, "When one of you prays, he does not know whether he has prayed three or four rak'ahs, so let him prostrate a rak'ah, performing its bowing and prostration well, and then let him perform two prostrations. Its narrators are trustworthy, and Malik ibn Anas has confirmed it in Al-Muwatta."
قَالَ رَسُولُ اللهِ ﷺ إِذَا صَلَّى أَحَدُكُمْ فَلَا يَدْرِي كَمْ صَلَّى ثَلَاثًا أَمْ أَرْبَعًا فَلْيَرْكَعْ رَكْعَةً يُحْسِنُ رُكُوعَهَا وَسُجُودَهَا ثُمَّ يَسْجُدُ سَجْدَتَيْنِ رُوَاتُهُ ثِقَاتٌ وَقَدْ وَقَفَهُ مَالِكُ بْنُ أَنَسٍ فِي الْمُوَطَّأِ