Tarawih structure:
1 tarwihah = 4 rakahs = 2 salams.
5 tarwihahs = 20 rakahs = 10 salams.
Four rests between the five groups are recommended.
Witr is separate. In Ramadan the imam leads witr after the tarawih congregation. The rests are a recommendation, not a condition of validity.