“The Messenger of Allah ﷺ stayed for nineteen days in which he shortened his prayer to two Rak’ah. So, whenever we stayed for nineteen days we would shorten our prayer to two Rak’ah, but if we stayed more than that we would pray four Rak’ah.” (Using translation from Ibn Mājah 1075)
سَافَرَ رَسُولُ اللهِ ﷺ سَفَرًا فَأَقَامَ تِسْعَ عَشْرَةَ يُصَلِّي رَكْعَتَيْنِ رَكْعَتَيْنِ قَالَ ابْنُ عَبَّاسٍ فَنَحْنُ إِذَا سَافَرْنَا فَأَقَمْنَا تِسْعَ عَشْرَةَ صَلَّيْنَا رَكْعَتَيْنِ رَكْعَتَيْنِ فَإِذَا أَقَمْنَا أَكْثَرَ مِنْ ذَلِكَ صَلَّيْنَا أَرْبَعًا