getYears function

Get a list of years for a given theme, with the total number of sets in each.