countQuakes function

count the number of earthquakes per year