Counting occurrences of word in a text
I'm not sure I understand why do you need a priority queue.  

The best algorithm should be as follows (pseudocode):

1) count the words
2) sort them by count


Counting each word you can loop through each word and update the count in the hash table for each word.    This is done $n$ times and you need $O(1)$ for accessing + $O(1)$ updating the hash table thus $O(n)$.

Sorting is $O(n \log n)$. Thus the complexity is $O(n \log n)$.