ENOfficial
Abu Hurairah said: The Prophet (ﷺ) used to observe I'tikaf during ten days of Ramadan every year. But when the year in which he died, he observed I'tikaf for twenty days.
Source: sunnah.com
Other translations
Arabic
حَدَّثَنَا هَنَّادٌ، عَنْ أَبِي بَكْرٍ، عَنْ أَبِي حَصِينٍ، عَنْ أَبِي صَالِحٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ كَانَ النَّبِيُّ صلى الله عليه وسلم يَعْتَكِفُ كُلَّ رَمَضَانَ عَشَرَةَ أَيَّامٍ فَلَمَّا كَانَ الْعَامُ الَّذِي قُبِضَ فِيهِ اعْتَكَفَ عِشْرِينَ يَوْمًا .
sunnah.com