code: @Override
    public Iterator<Counter> iterator() {
      return new Iterator<Counter>() {
        private Iterator<Map.Entry<String,Map<String,Counter>>> groupIter =
            internalMap.entrySet().iterator();
        private Iterator<Map.Entry<String,Counter>> currentGroupIter = null;
  
        @Override
        public boolean hasNext() {
          // advance current group if necessary
          if ((currentGroupIter == null || !currentGroupIter.hasNext()) && groupIter.hasNext()) {
            currentGroupIter = groupIter.next().getValue().entrySet().iterator();
          }
          return currentGroupIter != null && currentGroupIter.hasNext();
        }
  
        @Override
        public Counter next() {
          if (!hasNext()) {
            throw new NoSuchElementException("No more elements in iterator");
          }
          return currentGroupIter.next().getValue();
        }
  
        @Override
        public void remove() {
          throw new UnsupportedOperationException("remove() is not supported by CounterMap");
        }
      };
    }
docs: Returns an iterator over all the contained {@link Counter} instances for all groups.
  Note that the {@code remove()} operation <emphasis>is not supported</emphasis> in the returned
  {@code Iterator}.
  @return