<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def n_yearly_publications(self, refresh=True):
 """Number of journal publications in a given year."""

        pub_years = [int(ab.coverDate.split('-')[0])
                     for ab in self.get_journal_abstracts(refresh=refresh)]
        return Counter(pub_years)