(Imām Bukhārī narrates): Yahya bin Sulaiman narrated the hadith to us, he said: Ibn Wahb narrated the hadith to me, he said: Amr informed me that Abdur Rahman bin al-Qasim narrated the hadith to him, from his father, from Hazrat Abdullah bin Umar (Allāh be pleased with them both), he narrated that the Prophet ﷺ said:
The night prayer is two by two rak'ahs, then when you intend to turn away from the prayer, offer one rak'ah (joining it with the last pair), it will make all your prayer Witr.
Al-Qasim said: Since our reason has matured, we have seen the people offer three rak'ahs of Witr, and indeed there is scope in every way, and I hope there is no harm in any of them (that is, whether one rak'ah is offered or three rak'ahs are offered).
حَدَّثَنَا يَحْيَى بْنُ سُلَيْمَانَ، قَالَ حَدَّثَنِي عَبْدُ اللَّهِ بْنُ وَهْبٍ، قَالَ أَخْبَرَنِي عَمْرُو بْنُ الحَارِثِ، أَنَّ عَبْدَ الرَّحْمَنِ بْنَ القَاسِمِ، حَدَّثَهُ عَنْ أَبِيهِ، عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ، قَالَ قَالَ النَّبِيُّ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ صَلاَةُ اللَّيْلِ مَثْنَى ص ٢٥ مَثْنَى، فَإِذَا أَرَدْتَ أَنْ تَنْصَرِفَ، فَارْكَعْ رَكْعَةً تُوتِرُ لَكَ مَا صَلَّيْتَ قَالَ القَاسِمُ وَرَأَيْنَا أُنَاسًا مُنْذُ أَدْرَكْنَا يُوتِرُونَ بِثَلاَثٍ، وَإِنَّ كُلًّا لَوَاسِعٌ أَرْجُو أَنْ لاَ يَكُونَ بِشَيْءٍ مِنْهُ بَأْسٌ
Reference: Sahih Al Bukhari 993