Sayyiduna Zaid bin Thabit (may Allah be pleased with him) said: We were commanded to say «سبحان الله» 33 times, «الحمد لله» 33 times, and «الله اكبر» 34 times after every prayer. Then a man from among the Ansar was told in a dream: Has your Prophet commanded you to say tasbih 33 times, tahmid 33 times, and takbir 34 times after every prayer? He said: Yes. So he (the one in the dream) said: Say them 25 times each, and say «لا اله الا الله» 25 times. When this dream was mentioned to the Prophet Muhammad (peace and blessings be upon him), he said: "Do so."
Hadith Referenceسنن دارمي / من كتاب الصللاة / 1392
Hadith Takhrijاس حدیث کی سند صحیح ہے۔ دیکھئے: [نسائي 1349] ، [ابن حبان 2017]
Brief Explanation
(Commentary on Hadith 1391)
A believer’s dream is true, but legal rulings (shar‘i ahkam) are not established from dreams. This dream was seen in the presence of the Messenger of Allah (sallallahu alayhi wa sallam), and he (sallallahu alayhi wa sallam) affirmed it, which could have been through inspiration (ilham) or revelation (wahy). In any case, reciting each phrase 25 times is also correct, and reciting them 33, 33, and 34 times is also valid, and both have great merit.