Mishkat al-Masabih 973
وَعَن زيد بن ثَابت قَالَ: أُمِرْنَا أَنْ نُسَبِّحَ فِي دُبُرِ كُلِّ صَلَاةٍ ثَلَاثًا وَثَلَاثِينَ وَنَحْمَدَ ثَلَاثًا وَثَلَاثِينَ وَنُكَبِّرَ أَرْبَعًا وَثَلَاثِينَ فَأُتِيَ رَجُلٌ فِي الْمَنَامِ مِنَ الْأَنْصَارِ فَقِيلَ لَهُ أَمَرَكُمْ رَسُولُ اللَّهِ صَلَّى الله عَلَيْهِ وَسلم أَن تسبحوا فِي دبر كُلِّ صَلَاةٍ كَذَا وَكَذَا قَالَ الْأَنْصَارِيُّ فِي مَنَامِهِ نَعَمْ قَالَ فَاجْعَلُوهَا خَمْسًا وَعِشْرِينَ خَمْسًا وَعِشْرِينَ وَاجْعَلُوا فِيهَا التَّهْلِيلَ فَلَمَّا أَصْبَحَ غَدَا عَلَى النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَأَخْبَرَهُ فَقَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «فافعلوا» . رَوَاهُ أَحْمد وَالنَّسَائِيّ والدارمي
From Zayd ibn Thabit, who said: We were commanded to glorify [Allah] at the end of every prayer thirty-three times, praise [Him] thirty-three times and magnify [Him] thirty-four times. Then a man of the Ansar was visited in a dream and it was said to him: "Did the Messenger of Allah ﷺ command you to glorify [Allah] at the end of every prayer so many times?" The Ansari said in his dream: "Yes." He said: "Make it twenty-five [each], twenty-five, and include the tahlil in it." When morning came, he went to the Prophet ﷺ and told him, and the Messenger of Allah ﷺ said: "Then do it." Reported by Ahmad, an-Nasaʾi and ad-Darimi.