Added frequency to record_counts_by_year()