how to create word counter in java