All our prayers in Mecca- thirteen years- were two Rakaats (units) each. I name some books so that you can refer to them. Wasā'il al-Shīʿa is one of our major books, Jame-ul-Ahadith of Shia which is about forty volumes written by Grand Ayatollah Seyyed Hossein Borujerdi. The messenger of Allah came to Medina, and the prayers were still two Rakaats (units); the morning, noon, afternoon, evening and night prayers were all two Rakaats. When Imam Hasan Mujtaba was born, the messenger of Allah added four Rakaats to noon and afternoon prayers by the permission of Allah Almighty.
Allah Almighty mentioned in the Holy Quran that people can decrease two Rakaats from noon and afternoon prayers in times of traveling and war, but when they are in their city they have to say two four Rakkaats of noon and afternoon prayers. When Imam Hussein was born, three Rakaats were added to prayers; one Rakaat to evening prayers and two Rakaats to night prayers. Allah Almighty said to the prophet: the two Rakaats that you added to night prayers can be decreased and removed in times of traveling but that one Rakaat which is added for Imam Hussein must be remained until the day of resurrection and cannot be removed.
source : erfan.ir