added word_count method