The people were commanded to say "Subhan Allah" thirty-three times after every prayer, "Alhamdulillah" thirty-three times, and "Allahu Akbar" thirty-four times. A man from the Ansar saw someone in his dream who asked him, "Did the Messenger of Allah ﷺ command you to say 'Subhan Allah' thirty-three times after every prayer, 'Alhamdulillah' thirty-three times, and 'Allahu Akbar' thirty-four times?"He replied, "Yes."The figure said, "Make them twenty-five each, and include 'La ilaha illa Allah' among them."When morning came, the man went to the Prophet ﷺ and told him about it, and the Prophet ﷺ said, "Do as he said."
أخبرنا موسى بن حزام الترمذي قال حدثنا يحيى بن آدم عن ابن إدريس عن هشام بن حسان عن محمد بن سيرين عن كثير ابن أفلح
أمروا أن يسبحوا دبر كل صلاة ثلاثا وثلاثين ويحمدوا ثلاثا وثلاثين ويكبروا أربعا وثلاثين فأتي رجل من الأنصار في منامه فقيل له أمركم رسول الله ﷺ أن تسبحوا دبر كل صلاة ثلاثا وثلاثين وتحمدوا ثلاثا وثلاثين وتكبروا أربعا وثلاثين قال نعم قال فاجعلوها خمسا وعشرين واجعلوا فيها التهليل فلما أصبح أتى النبي ﷺ فذكر ذلك له فقال اجعلوها كذلك
[Hasan] Reported by Tirmidhi, Book of Supplications, Chapter on the Virtue of Tasbih and Tahmid, etc., no. 3413, from the hadith of Hisham bin Hassan, with this wording, using "an" in his transmission. It is also found in Kubra, no. 1273. Tirmidhi said, Sahih. Ibn Khuzayma graded it sahih, 21/370, no. 752, as did Ibn Hibban, no. 2340, and Hakim, 1/253, and Dhahabi. The following hadith serves as a corroborating witness for it.