Count the pages in a Hugo section

If you need to show how many pages belong to a Hugo section, filter .Site.RegularPages by its Section value and pass the result to len:

<p>Total number of pages in the /articles/ section:
	{{ len (where .Site.RegularPages "Section" "==" "articles") }}.
</p>

Using .Site.RegularPages keeps section pages and other list pages out of the count. Replace articles with the name of the section you want to measure.