The Messenger of Allah's ﷺ night prayer consisted of ten units, after which he would perform witr with a single unit, and then pray two units for the dawn prayer. That made thirteen units in total.
كانت صلاة رسول الله ﷺ من الليل عشر ركعات يوتر بسجدة، ويركع ركعتي الفجر. فتلك ثلاث عشر ركعة.
Bukhari narrated it in the Book of Tahajjud (1140), and Muslim in the Book of the Prayer of Travelers (738/128), both from the hadith of Hanzala, from Qasim bin Muhammad, who said, "I heard Ayesha say," and then he mentioned the same, the wording being that of Muslim. The wording of Bukhari is, "He used to pray thirteen rakats at night, including Witr and the two rakats of Fajr."