code: public double count(T obj, double count) {
          if (count <= 0)
              throw new IllegalArgumentException("Count must be positive: " + count);
          double oldCount = counts.get(obj);
          double newCount = count + oldCount;
          counts.put(obj, newCount);
          sum += count;
          return newCount;
      }
docs: Counts the object, increasing its total count by the specified positive amount.
  
  @param count a positive value for the number of times the object occurred
  
  @throws IllegalArgumentException if {@code count} is not a positive value.