code: public static <E> Counter<E> powNormalized(Counter<E> c, double temp) {
      Counter<E> d = c.getFactory().create();
      double total = c.totalCount();
      for (E e : c.keySet()) {
        d.setCount(e, Math.pow(c.getCount(e) / total, temp));
      }
      return d;
    }
docs: Returns a counter where each element corresponds to the normalized count of
  the corresponding element in c raised to the given power.