Add word-count in ruby