In The Name Of Allah Most Gracious Most Merciful
Assalaamu Alaykum Wa Rahmatuallahi wa barakatuhu
Taraweeh 20 Rakat
Initially Prophet Muhammad salla lahu alaihi wa sallam Prayed In The Mosque
Praying at Night in Ramadaan (Taraweeh) Bukhari :: Book 3 :: Volume 32 :: Hadith 229Narrated 'Urwa:
That he was informed by 'Aisha, "Allah's Apostle went out in the middle of the night and prayed in the mosque and some men prayed behind him. In the morning, the people spoke about it and then a large number of them gathered and prayed behind him (on the second night). In the next morning the people again talked about it and on the third night the mosque was full with a large number of people. Allah's Apostle came out and the people prayed behind him. On the fourth night the Mosque was overwhelmed with people and could not accommodate them, but the Prophet came out (only) for the morning prayer. When the morning prayer was finished he recited Tashah-hud and (addressing the people) said, "Amma ba'du, your presence was not hidden from me but I was afraid lest the night prayer (Qiyam) should be enjoined on you and you might not be able to carry it on." So, Allah's Apostle died and the situation remained like that (i.e. people prayed individually). "
it is clear that there is no fixed limit for the Tarawih Prayer; therefore, one should refrain from getting into any controversy in this regard. However, in mosques, where eight congregational Rakats are offered, it is advisable not to offer further 12 Rakats in congregation, thus avoiding any unwanted disputes amongst the Muslims. For those who wish to offer more Rakats can very well do so at their homes. Similarly, in mosques, where 20 congregational Rakats are offered, it is advisable not to offer 8 Rakats in different congregation so that there is no conflict among the Muslims.
Later Umar r.a Allowed Congregation
Praying at Night in Ramadaan (Taraweeh) Bukhari :: Book 3 :: Volume 32 :: Hadith 227 Narrated Abu Huraira:
Allah's Apostle said, "Whoever prayed at night the whole month of Ramadan out of sincere Faith and hoping for a reward from Allah, then all his previous sins will be forgiven." Ibn Shihab (a sub-narrator) said, "Allah's Apostle died and the people continued observing that (i.e. Nawafil offered individually, not in congregation), and it remained as it was during the Caliphate of Abu Bakr and in the early days of 'Umar's Caliphate." 'Abdur Rahman bin 'Abdul Qari said, "I went out in the company of 'Umar bin Al-Khattab one night in Ramadan to the mosque and found the people praying in different groups. A man praying alone or a man praying with a little group behind him. So, 'Umar said, 'In my opinion I would better collect these (people) under the leadership of one Qari (Reciter) (i.e. let them pray in congregation!)'. So, he made up his mind to congregate them behind Ubai bin Ka'b. Then on another night I went again in his company and the people were praying behind their reciter. On that, 'Umar remarked, 'What an excellent Bid'a (i.e. innovation in religion) this is; but the prayer which they do not perform, but sleep at its time is better than the one they are offering.' He meant the prayer in the last part of the night. (In those days) people used to pray in the early part of the night."
Twenty Three Rakats
Prayer in Ramadan Malik :: Book 6 : Hadith 6.2.5
Yahya related to me from Malik that Yazid ibn Ruman said, "The people used to watch the night in prayer during Ramadan for twenty-three rakas in the time of Umar ibn al-Khattab."
*Note:Twenty of Taraweeh and 3 of witr.
We also find that some of the Taba'een used to pray 20 and some used to pray 36 Rakats in Tarawih. (Musannaf Ibn Abi Shaiba, Vol.2, Pages 165 & 166).
Praying at Night in Ramadaan (Taraweeh) Bukhari :: Book 3 :: Volume 32 :: Hadith 226 Narrated Abu Huraira:
I heard Allah's Apostle saying regarding Ramadan, "Whoever prayed at night in it (the month of Ramadan) out of sincere Faith and hoping for a reward from Allah, then all his previous sins will be forgiven."
Tahajjud Is 8 Rakat
Prayer at Night (Tahajjud) Bukhari :: Book 2 :: Volume 21 :: Hadith 248 Narrated Abu Salma bin 'Abdur Rahman:
I asked 'Aisha, "How is the prayer of Allah's Apostle during the month of Ramadan." She said, "Allah's Apostle never exceeded eleven Rakat in Ramadan or in other months; he used to offer four Rakat-- do not ask me about their beauty and length, then four Rakat, do not ask me about their beauty and length, and then three Rakat." Aisha further said, "I said, 'O Allah's Apostle! Do you sleep before offering the Witr prayer?' He replied, 'O 'Aisha! My eyes sleep but my heart remains awake'!"
Praying at Night in Ramadaan (Taraweeh) Bukhari :: Book 3 :: Volume 32 :: Hadith 230 Narrated Abu Salama bin 'Abdur Rahman:
that he asked 'Aisha "How was the prayer of Allah's Apostle in Ramadan?" She replied, "He did not pray more than eleven Rakat in Ramadan or in any other month. He used to pray four Rakat ---- let alone their beauty and length----and then he would pray four ----let alone their beauty and length ----and then he would pray three Rakat (Wiitr)." She added, "I asked, 'O Allah's Apostle! Do you sleep before praying the Witr?' He replied, 'O 'Aisha! My eyes sleep but my heart does not sleep."
*Note:The Hadith says “He did not pray more than eleven Rakat in Ramadan or in any other month” so this is not Taraweeh because Taraweeh is only prayed in Ramadhan ,its Tahajjud.
Ibn 'Umar said, "While the prophet was on the pulpit, a man asked him how to offer the night prayers. He replied, ' Pray two Rakat at a time and then two and then two and so on, and if you are afraid of the dawn (the approach of the time of the Fajr prayer) pray one Rakat and that will be the witr for all the Rakat which you have offered." Ibn 'Umar Said, "The last Rakat of the night prayer should be odd, for the prophet ordered it to be so. ( Sahih Bukhari, Vol. 1, Hadith No. 461).
Narrated Amr ibn Anbasah as-Sulami
I asked: "Apostle of Allah, in which part of the night the supplication is more likely to be accepted? He Replied: In the last part: Pray as much as you like, for the prayer is attended by the angels and it is recorded till you offer the dawn prayer. (Abu Dawood, Vol. 1, Hadith No. 1272).
Tahajjud Malik :: Book 7 : Hadith 7.3.13
Yahya related to me from Malik from Nafi and Abdullah ibn Umar that a man asked the Messenger of Allah, may Allah bless him and grant him peace, about night prayers. The Messenger of Allah, may Allah bless him and grant him peace, said, "Night prayers are two by two, and when you are afraid that dawn is approaching, pray one raka to make what you have prayed odd."
*Note: Tahajjud can be prayed 2 Rakat, with further 2,2,2 or with 4 Rakat and further 4.
Allah knows best