أَخْبَرَنَا مُوسَى بْنُ حِزَامٍ التِّرْمِذِيُّ، قَالَ حَدَّثَنَا يَحْيَى بْنُ آدَمَ، عَنِ ابْنِ إِدْرِيسَ، عَنْ هِشَامِ بْنِ حَسَّانَ، عَنْ مُحَمَّدِ بْنِ سِيرِينَ، عَنْ كَثِيرِ بْنِ أَفْلَحَ، عَنْ زَيْدِ بْنِ ثَابِتٍ، قَالَ أُمِرُوا أَنْ يُسَبِّحُوا، دُبُرَ كُلِّ صَلاَةٍ ثَلاَثًا وَثَلاَثِينَ وَيَحْمَدُوا ثَلاَثًا وَثَلاَثِينَ وَيُكَبِّرُوا أَرْبَعًا وَثَلاَثِينَ فَأُتِيَ رَجُلٌ مِنَ الأَنْصَارِ فِي مَنَامِهِ فَقِيلَ لَهُ أَمَرَكُمْ رَسُولُ اللَّهِ صلى الله عليه وسلم أَنْ تُسَبِّحُوا دُبُرَ كُلِّ صَلاَةٍ ثَلاَثًا وَثَلاَثِينَ وَتَحْمَدُوا ثَلاَثًا وَثَلاَثِينَ وَتُكَبِّرُوا أَرْبَعًا وَثَلاَثِينَ قَالَ نَعَمْ ‏.‏ قَالَ فَاجْعَلُوهَا خَمْسًا وَعِشْرِينَ وَاجْعَلُوا فِيهَا التَّهْلِيلَ فَلَمَّا أَصْبَحَ أَتَى النَّبِيَّ صلى الله عليه وسلم فَذَكَرَ ذَلِكَ لَهُ فَقَالَ ‏"‏ اجْعَلُوهَا كَذَلِكَ ‏"‏ ‏.‏

It was narrated that Zaid bin Thabit said: "They were commanded to say the tasbih thirty-three times following the prayer, and to say the tahmid thirty-three times, and to say the takbir thirty-four times, then a man from among the Ansar was told in a dream: 'Did the Messenger of Allah (PBUH) command you to say the tasbih thirty-three times following the prayer, and to say the tahmid thirty-three times, and to say the takbir thirty-four times?' He said: 'Yes.' 'Instead of that, say each one twenty-five times, and include the tahlil among them.' The next morning he came to the Messenger of Allah (PBUH) and told him about that, and he said: 'Do that.'" Translation Not Available

Book Ref: Sunan An Nisai Book 13 Hadith 1350
Web Ref:  Sunan An Nisai Vol 2 Book 13 Hadith 1351