The Messenger of Allah ﷺ used to count the days in Sha'ban in a manner he did not count any other month; then he fasted when he sighted the new moon of Ramadan; but if the weather was cloudy he counted thirty days and then fasted.
سَمِعْتُ عَائِشَةَ ؓ تَقُولُ كَانَ رَسُولُ اللَّهِ ﷺ يَتَحَفَّظُ مِنْ شَعْبَانَ مَا لاَ يَتَحَفَّظُ مِنْ غَيْرِهِ ثُمَّ يَصُومُ لِرُؤْيَةِ رَمَضَانَ فَإِنْ غُمَّ عَلَيْهِ عَدَّ ثَلاَثِينَ يَوْمًا ثُمَّ صَامَ