Basic word counter and ranking program in Java.