Shama-il Tirmidhi Chapter 039, Hadith Number 009 (256).

Zayd bin Khaalid Al-Juhani Radiyallahu 'Anhu says: "I once made up my mind that today I will closely study how Rasulullah Sallallahu 'Alayhi Wasallam performed his prayers. I lay down on the threshold of the house or a tent of Rasulullah Sallallahu 'Alayhi Wasallam (so that I may have a chance to observe with close attention). Rasulullah Sallallahu 'Alayhi Wasallam first performed two short rak'ahs. After that he performed long, long, long rak'ahs. (Long is mentioned thrice because of the lengthy periods spent in the rak'ahs). He then performed two rak'ahs shorter than the previous one's. Then performed two rak'ahs shorter than that. And again performed two rak'ahs shorter than the previous one. He again performed two rak'ahs shorter than that. He then performed the witr. All these (amounted to) thirteen rak'ahs".

Commentary
Those who are of the opinion that witr is one rak'ah, say that two rak'ahs nafl were performed six times and one rak'ah witr. The total of which is thirteen. Those who are of the opinion that witr is three rak'ahs, say that a total of fifteen rak'ahs were performed. Thirteen rak'ahs are counted in this manner, that the first two rak'ahs of tahiyyatul wudu are not included in a few narrations. "Then he Performed two rak'ahs shorter than the previous one". This instead of being mentioned four times, is only mentioned thrice. In this case besides the two short rak'ahs of tahiyyatul wudu which is mentioned in the beginning, the total amounts to ten nafl rak'ahs. In such a case there is no other way but to accept witr as three rak'ahs. If witr is taken to be one rak'ah, then the total shall not amount to thirteen rak'ahs.

In this hadith it is mentioned that Sayyidina Zayd bin Khaalid, ,AI-Juhani -Radiyallahu 'Anhu slept on the threshold of the house or a tent of Sayyidina Rasulullah Sallallahu 'Alayhi Wasallam. A narrator of this hadith is in doubt that did the teacher say the threshold of the house or that of the tent. The muhadditheen always took great care to convey the correct wordings. When in a little doubt, they always made this clear. It is evident that this was on the threshold of a tent, as this incident took place on a journey. When Sayyidina Rasulullah Sallallahu 'Alayhi Wasallam was in Madina, he slept at the house of one of his wives, and Sayyidina Zayd bin Khaalid Radiyallahu 'Anhu did not get a chance to observe this here. On a journey Sayyidina Rasulullah Sallallahu 'Alayhi Wasallam may have slept alone in a tent, it is possible that none of his wives were accompanying him. In such as instance this probability is understood. Therefore this is most correct. The majority of the 'ulama say, this incident was at the time of a journey.