code: def _count_counters(self, counter):
          
          if getattr(self, 'as_set', False):
              return len(set(counter))
          else:
              return sum(counter.values())
docs: Return all elements count from Counter