“We went out with the Messenger of Allah ﷺ from Al-Madinah to Makkah, during which time we shortened our prayer to two Rak’ah, until we came back.” I asked: “How long did he stay in Makkah?” He said: “Ten (days).” (Using translation from Ibn Mājah 1077)
خَرَجْنَا مَعَ رَسُولِ اللهِ ﷺ مِنَ الْمَدِينَةِ فَجَعَلَ يُصَلِّي رَكْعَتَيْنِ رَكْعَتَيْنِ حَتَّى رَجَعَ قَالَ يَحْيَى فَقُلْتُ لِأَنَسٍ كَمْ أَقَامَ؟ قَالَ عَشْرًا