The Messenger of Allah ﷺ used to perform the witr prayer with thirteen units. When he grew older and weaker, he performed witr with seven.
كان رسول الله ﷺ يوتر بثلاث عشرة ركعة، فلما كبر وضعف أوتر بسبع.
Tirmidhi (457) and Nasai (1709) both narrated it via Abu Muawiya, from Amash, from Amr bin Mura, from Yahya bin Jazzar, from Umm Salama, as I have mentioned. Tirmidhi said, "A hasan hadith." I say, this is indeed so, for Yahya bin Jazzar Urani, as noted before, is "truthful." Hakim (1/306) also narrated it by this route and said, "Sahih according to the standard of the two sheikhs." This is a mistake on his part, for Muslim alone narrated from Yahya bin Jazzar. Daraqutni's statement has already been mentioned, that the hadith of Ayesha is closer to being correct than the hadith of Umm Salama. I say, but this does not preclude the soundness of both hadiths, even though the hadith of Ayesha is more sahih, because Abu Muawiya, namely Muhammad bin Khazim, is reliable, a hafiz, and the most retentive of people regarding the hadith of Amash, so he should not be weakened simply because someone else disagrees with him.Tirmidhi then said, "It has been narrated from the Prophet ﷺ that the Witr was performed with thirteen, eleven, nine, seven, five, three, and one." He then said, Ishaq bin Ibrahim said, "The meaning of what has been narrated, that the Prophet ﷺ used to perform Witr with thirteen, is that he used to pray thirteen rakats during the night including the Witr, so the night prayer was attributed to the Witr. He argued this on the basis of what was narrated from the Prophet ﷺ, that he said, 'Perform Witr, O people of the Quran,' saying that by this he only meant the night prayer, meaning that the night prayer is incumbent specifically upon the companions of the Quran." End of quote.I say, this statement of his should not be taken as absolute, for it has been established that the Prophet ﷺ prayed Witr with anywhere from one rakat to seven, with a single tashahhud. Muhammad bin Nasr said in his Kitab al-Witr, "Our position is that performing Witr with one, three, five, seven, or nine rakats, all of that is permissible and hasan, based on what we have related of the reports from the Prophet and his companions after him." Sufyan said, "If you wish, perform Witr with five, if you wish, with three, and if you wish, with one rakat." Muhammad bin Sirin said, "They used to perform Witr with five, with three, and with one rakat, and considered all of that hasan." End of quote.