Displaying number of posts

Hi. I am retrieving a list of articles using this code:

{{ range (where .Site.Pages "Section" "post" ) }}

How can I retrieve the size of that range? The specific use case here is I want to show something like “23 Posts” at the top of the page.


I just figured it out. Here’s the solution for anyone else that needs it:

{{ $posts := (where .Site.Pages "Section" "post") }}

<h1>{{ len($posts) }} Posts</h1>