It is narrated from Sayyidah Aishah (may Allah be pleased with her) that the Messenger of Allah (peace and blessings be upon him) used to recite these same words in the tashahhud of the prayer, in its middle and at its end: 'Bismillah, at-tahiyyatu lillah, as-salawatu lillah, az-zakiyatu lillah, ashhadu an la ilaha illallah, wa ashhadu anna Muhammadan 'abduhu wa rasuluh, as-salamu 'alayka ayyuhan-nabiyyu wa rahmatullahi wa barakatuh, as-salamu 'alayna wa 'ala 'ibadillahis-salihin' (I begin with the name of Allah. All verbal, practical and financial acts of worship are all for Allah. I bear witness that there is no god but Allah, and I bear witness that Muhammad (peace and blessings be upon him) is the servant of Allah and His Messenger. Peace be upon you, O Prophet, and the mercy of Allah and His blessings. Peace be upon us and upon all the righteous servants of Allah). He was counting it out for us on his hand, in the way the Arabs count.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 2833