How far have you got and where are you stuck? Do you know how to:
- read words from a file?
- store the words in a suitable data structure, updating the count if the word is already present?
- sort the data into alphabetical order?
If you're stuck on a specific part of the code, can you post a MINIMAL sample that shows the problem, explaining what exactly it isn't doing that you want it to (or is doing that you don't want it to)?