docs: public static <E> Counter<E> asCounter(FixedPrioritiesPriorityQueue<E> p) {
      FixedPrioritiesPriorityQueue<E> pq = p.clone();
      ClassicCounter<E> counter = new ClassicCounter<E>();
      while (pq.hasNext()) {
        double priority = pq.getPriority();
        E element = pq.next();
        counter.incrementCount(element, priority);
      }
      return counter;
    }