وَعَنْ عَائِشَةَ رَضِيَ اللَّهُ عَنْهَا قَالَتْ: كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَتَحَفَّظُ مِنْ شَعْبَانَ مَالَا يَتَحَفَّظُ مِنْ غَيْرِهِ. ثُمَّ يَصُومُ لِرُؤْيَةِ رَمَضَانَ فَإِنْ غُمَّ عَلَيْهِ عَدَّ ثَلَاثِينَ يَوْمًا ثُمَّ صَامَ. رَوَاهُ أَبُو دَاوُد
Translation

‘A’isha said that God’s messenger used to count the days in Sha'ban in a manner he did not practise any other month, then fasted when he saw the new moon of Ramadan; but if the weather was cloudy he counted thirty days and then fasted. Abu Dawud transmitted it.