Adding word count using ruby methods