Improved wordcount function
Changed expectation file due to rounding errors