code: public static <E> Counter<E> average(Counter<E> c1, Counter<E> c2) {
      Counter<E> average = c1.getFactory().create();
      Set<E> allKeys = new HashSet<E>(c1.keySet());
      allKeys.addAll(c2.keySet());
      for (E key : allKeys) {
        average.setCount(key, (c1.getCount(key) + c2.getCount(key)) * 0.5);
      }
      return average;
    }
docs: Returns a new Counter with counts averaged from the two given Counters. The
  average Counter will contain the union of keys in both source Counters, and
  each count will be the average of the two source counts for that key, where
  as usual a missing count in one Counter is treated as count 0.
  
  @return A new counter with counts that are the mean of the resp. counts in
  the given counters.