code: public void add(Counter<? extends T> counter) {
          for (Map.Entry<? extends T,Integer> e : counter)
              count(e.getKey(), e.getValue());
      }
      
      /**
       * Counts the object, increasing its total count by 1.
       */
      public int count(T obj) {
          int objIndex = (allowNewIndices) 
              ? objectIndices.index(obj)
              : objectIndices.find(obj);
          if (objIndex < 0)
              return 0;
          int curCount = indexToCount.get(objIndex);
          indexToCount.put(objIndex, curCount + 1);
          sum++;
          return curCount + 1;
      }
docs: Adds the counts from the provided {@code Counter} to the current counts,
  adding new elements as needed.