code: def counter(self, counter_name, default=0):
      
      return self._state.counters_map.get(counter_name, default)
docs: Get the current counter value.
  
      Args:
        counter_name: name of the counter in string.
        default: default value in int if one doesn't exist.
  
      Returns:
        Current value of the counter.