عَنِ ابْنِ عَبَّاسٍ رَضِيَ اللَّهُ عَنْهُ قَالَ: سَافَرَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ فَأَقَامَ تِسْعَ عَشْرَةَ يُصَلِّي رَكْعَتَيْنِ رَكْعَتَيْنِ، قَالَ ابْنُ عَبَّاسٍ فَنَحْنُ إِذَا سَافَرْنَا فَأَقَمْنَا تِسْعَ عَشْرَةَ صَلَّيْنَا رَكْعَتَيْنِ رَكْعَتَيْنِ، فَإِذَا أَقَمْنَا أَكْثَرَ مِنْ ذَلِكَ صَلَّيْنَا أَرْبَعًا
Sayyiduna Abdullah bin Abbas (may Allah be pleased with him) says: The Messenger of Allah (peace and blessings be upon him) undertook a journey and stayed (in Makkah) for nineteen days, and he used to perform prayers of two rak‘ahs each. Sayyiduna Abdullah bin Abbas (may Allah be pleased with him) says: This is why, when we stay for nineteen days during a journey, we perform two rak‘ahs, but when we stay for more days than that, we perform four rak‘ahs.