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. (Using translation from Abū Dāʾūd 2325)
قَيْسٍقَالَ سَمِعْتُ عَائِشَةَ تَقُولُ كَانَ رَسُولُ اللهِ ﷺ يَتَحَفَّظُ مِنْ هِلَالِ شَعْبَانَ مَا لَا يَتَحَفَّظُ مِنْ غَيْرِهِ ثُمَّ يَصُومُ لِرُؤْيَةِ رَمَضَانَ فَإِنْ غُمَّ عَلَيْهِ عَدَّ ثَلَاثِينَ يَوْمًا ثُمَّ صَامَ