passing all rspec tests for word_count