Did the Prophet (sws) get the Hadiths recorded in writing and how many? How many of them were recorded in writing during the period of the rightly guided caliphs?
You may consult the book 'Hifazat wa Hujiyyat Hadīth' of Mawlana Fahim Ahmad 'Uthmani for a detailed study of the Hadīth compilation in the early period of Islam. In this brief reply I can state that the names of several Companions of the holy Prophet (sws) have been recorded in the history who had written a number of hadiths. Similarly, the holy Prophet (sws) also ordered some people to write down the hadīths and got them recorded on request of some people. The earliest collection of hadiths, available today, is that of Muwatta of Imam Malik.
(Translated into English by Abid Mahmood)