At a certain movie theater, there are 16 rows and each row has either 20 or 24 seats. If the total number of seats in all 16 rows is 348, how many rows have 24 seats?