docs: public static <E> Counter<E> toCounter(Map<Integer, ? extends Number> counts, Index<E> index) {
  
      Counter<E> counter = new ClassicCounter<E>();
      for (Map.Entry<Integer, ? extends Number> entry : counts.entrySet()) {
        counter.setCount(index.get(entry.getKey()), entry.getValue().doubleValue());
      }
      return counter;
    }