word counter: works with the test file