code: public static <E> void divideInPlace(Counter<E> target, Counter<E> denominator) {
      for (E key : target.keySet()) {
        target.setCount(key, target.getCount(key) / denominator.getCount(key));
      }
    }
docs: Divides every non-zero count in target by the corresponding value in the
  denominator Counter. Beware that this can give NaN values for zero counts
  in the denominator counter!