Fasting more than three days in the month
Question

I have read hadith on how one should not fast more than 3 times in a month, or to fast like Dawud. I recently read stories of how the sahaba fasted many days in compensation for their misdeeds. Is this permissible?.
Praise be to Allah.What you have read, that it is not permissible to fast for more than three days in a month or to observe the fast of Dawood (peace be upon him), is not correct. The matter is more flexible than that. You can fast less than three days or more. There follow some of the ahaadeeth on this topic: 
1 – It was narrated from Abu Qutaadah al-Ansaari (may Allah be pleased with him) that the Messenger of Allah (peace and blessings of Allah be upon him) was asked about his fasting. The Messenger of Allah (peace and blessings of Allah be upon him) got angry, then ‘Umar (may Allah be pleased with him) said, “We are content with Allah as our Lord, with Islam as our religion, with Muhammad as our Prophet and with the oath of allegiance (bay’ah) that we have given.” Then he was asked about one who fasts for a lifetime and he said, “He did not fast and he did not break his fast.” [I.e., it becomes a routine for him such that he no longer feels the difference between fasting and not fasting] Then he was asked about fasting two days and not fasting for one day, and he said, “Who is able to do that?” Then he was asked about fasting one day and not fasting for two days, and he said, “Would that Allah gave us strength for that.” And he was asked about fasting one day and not fasting one day (i.e., fasting alternate days) and he said, “That is the fasting of my brother Dawood (peace be upon him).” And he was asked about fasting on Mondays, and he said, “That is the day on which I was born and the day on which my mission began (or on which Revelation came down to me).” And he said, “Fasting for three days each month and Ramadaan each year is the fast of a lifetime.” And he was asked about fasting on the Day of ‘Arafaah, and he said, “It expiates for the past year and the coming year,” and he was asked about fasting on the Day of ‘Ashoora’, and he said, “It expiates for the past year.” Narrated by Muslim, 1162. 
It is clear from this hadeeth that fasting is encouraged, whether it is one or two days each year, one day each week, three days each month, fasting one day and not fasting two days or vice versa, or fasting one day and not the next. The matter is flexible. 
2 – It was narrated from Abu Ayyoob al-Ansaari (may Allah be pleased with him) that the Messenger of Allah (peace and blessings of Allah be upon him) said: “Whoever fasts Ramadaan then follows it with six days of Shawwaal, it is as if he fasted for a lifetime.” Narrated by Muslim, 1164. 
This indicates that what the questioner has read is wrong, for it encourages fasting six days in one month. 
3 – It was narrated that ‘Aa’ishah (may Allah be pleased with her) said: “The Messenger of Allah (peace and blessings of Allah be upon him) used to fast until we thought that he would never break his fast, then he would not fast until we thought that he would never fast. I never saw the Messenger of Allah (peace and blessings of Allah be upon him) fasting a complete month apart from Ramadaan, and I never saw him fast in any other month more than Sha’baan.” (Narrated by al-Bukhaari, 1868; Muslim, 1156). 
This hadeeth also clearly indicates that there is no set limit or any specific number of days to be fasted. 
And Allah knows best.