Implemented the count_sentences modifier