Implemented the count_paragraphs modifier