ENOfficial
Narrated Yahya bin 'Is-haq: I heard Anas saying, "We traveled with the Prophet (ﷺ) from Medina to Mecca and offered two rak`at (for every prayer) till we returned to Medina." I said, "Did you stay for a while in Mecca?" He replied, "We stayed in Mecca for ten days."
Source: sunnah.com
Other translations
Arabic
حَدَّثَنَا أَبُو مَعْمَرٍ، قَالَ حَدَّثَنَا عَبْدُ الْوَارِثِ، قَالَ حَدَّثَنَا يَحْيَى بْنُ أَبِي إِسْحَاقَ، قَالَ سَمِعْتُ أَنَسًا، يَقُولُ خَرَجْنَا مَعَ النَّبِيِّ صلى الله عليه وسلم مِنَ الْمَدِينَةِ إِلَى مَكَّةَ، فَكَانَ يُصَلِّي رَكْعَتَيْنِ رَكْعَتَيْنِ حَتَّى رَجَعْنَا إِلَى الْمَدِينَةِ. قُلْتُ أَقَمْتُمْ بِمَكَّةَ شَيْئًا قَالَ أَقَمْنَا بِهَا عَشْرًا.
sunnah.com