Do you want help, or a code dump?
Do you know how to read a file? If not [url=http://java.sun.com/docs/books/tutorial/essential/io/index.html]The Java?Tutorials > Essential Classes: Basic I/O[/url]
[url=http://www.catb.org/~esr/faqs/smart-questions.html#bespecific]How To Ask Questions The Smart Way: Use meaningful, specific subject headers[/url]
HashMap is the data structure you are looking for.
http://java.sun.com/docs/books/tutorial/collections/interfaces/map.html
You can have each word(which you read from the file) as the key and the number of times it is repeated as the value of your Map.
Whenever you have a word you can get the value of the word(key) from the Map.
If the value is null, set the value for the word as 1 in the Map.
Else, increment the value by one and set the new value for the corresponding key.