Sorts words in given text by: A) number of occurrences (then)  B) order of appearance