16 teams enter a competition. They are divided into four pools (A, B, C and D) of four teams each. Every team plays one match against the other teams in its pool.
After the pool matches are completed:
- the winner of pool A plays the 2nd placed team of pool B.
- the winner of pool B plays the 2nd placed team of pool A.
- the winner of pool C plays the 2nd placed team of pool D.
- the winner of pool D plays the 2nd placed team of pool C.
The winners of these 4 matches then can play semi-finals, and the winner of the semi-finals play in the finals.
How many matches are played altogether?