the answer is 4 measures. here’s an explanation/breakdown:
• 3 quarter notes = 1st measure
• 1 half note + 1 quarter note = 2nd measure
• 2 eighth notes + 2 quarter notes = 3rd measure
• 3 quarter notes = 4th measure
when there is 3 beats in a measure, that means the notes have to add up to a total of 3 beats. for example, the quarter note gets 1 beat in this case, so 3 quarter notes will make 1 measure. in the next measure of this example, the half note gets 2 beats and the quarter note gets 1 beat, so it makes measure.