code: def counter(self, position=None, **kwargs):
          
  
          for key, val in self.defaults.items():
              if key not in kwargs:
                  kwargs[key] = val
          kwargs['manager'] = self
  
          counter = self.counter_class(**kwargs)
  
          if position is None:
              toRefresh = []
              if self.counters:
                  pos = 2
                  for cter in reversed(self.counters):
                      if self.counters[cter] < pos:
                          toRefresh.append(cter)
                          cter.clear(flush=False)
                          self.counters[cter] = pos
                          pos += 1
  
              self.counters[counter] = 1
              self._set_scroll_area()
              for cter in reversed(toRefresh):
                  cter.refresh(flush=False)
              self.stream.flush()
  
          elif position in self.counters.values():
              raise ValueError('Counter position %d is already occupied.' % position)
          elif position > self.height:
              raise ValueError('Counter position %d is greater than terminal height.' % position)
          else:
              self.counters[counter] = position
  
          return counter
docs: Args:
              position(int): Line number counting from the bottom of the screen
              kwargs(dict): Any additional :py:term:`keyword arguments<keyword argument>`
                  are passed to :py:class:`Counter`
  
          Returns:
              :py:class:`Counter`: Instance of counter class
  
          Get a new progress bar instance
  
          If ``position`` is specified, the counter's position can change dynamically if
          additional counters are called without a ``position`` argument.