The Imam of the Azhar, shaykh Salih al-Ja’fari (may Allah be pleased with him and please him) said,
[On the Number of the Taraweeh Prayers]
Shaykh Mahmud Khattab al-Subki said in his commentary on Sunan Abu Dawud, “The Taraweeh prayers are encouraged (mustahabba), and they have no set number.” This is the speech of the imams of knowledge. The Messenger of Allah (peace and blessings be upon him and his family) said, “Whoever stands in prayer in Ramadan, out of faith and seeking their reward, will have all his previous sins forgiven.” Narrated by the two shaykhs [Bukhari and Muslim].
The Messenger (peace and blessings be upon him and his family) never said: Whoever stands in prayer and prays ten rak’ahs (units) or twenty rak’ahs, or thirty. Our master Umar (may Allah be pleased with him), through his ijtihad, gathered the people together over twenty rak’ahs in the mosque. That makes it a sunnah.
He (peace and blessings be upon him) said, “Follow my sunnah and the sunna of the rightly-guided caliphs after me. Hold on to them firmly.” Narrated by al-Tirmidhi and Ibn Majah.
He also said, “Abu Bakr and Umar are my hearing and my sight.” Narrated by al-Tirmidhi.
Thousands of Companions agreed upon the 20 rak’ahs, including Uthman and Ali, who had been given the glad tidings of Paradise.
Imam Malik the scholar of Madina (may Allah be pleased with him), and imam al-Shafi’i (may Allah be pleased with him) said: The Prophet (peace and blessings be upon him and his family) did not have to pray Taraweeh, but was under the obligation to pray Qiyam al-Layl (night prayers).
He (peace and blessings be upon him and his family) came out on the first day and prayed, and the Companions prayed behind him. He also prayed on the second day, but on the third day he did not come out. He said, “I feared that it would become obligatory upon you.”
The narrators have differed on how many rak’ahs the Prophet (peace and blessings be upon him and his family) prayed [in those two days]: Did he pray eight rak’ahs or twenty rak’ahs, beside the shaf’ and witr? He did not pray more than that (peace and blessings be upon him and his family).
[On the Place of the Taraweeh Prayers]
The Malikis said: It is permissible to pray the taraweeh at home for those who have a strong will, as long as there are still people praying them in the mosques.
– Shaykh Salih al-Ja’fari, The Friday Lessons.