Showing the word count in Jekyll

If you want to count word in a string, use number_of_words liquid filter.

<p>
{% assign wordCount = post.content | number_of_words %}
</p>