<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def update_counts(self, current):
 """ updates counts for the class instance based on the current dictionary counts args: ----- current: current dictionary counts """

        for item in current:
            try:
                self.counts[item] += 1
            except KeyError:
                self.counts[item] = 1