Finding Count on a set of files with specific Front Matter

@davidsneighbour and @jmooring

Thank you for being there. It worked. To be honest, I still could not understand why the “Params.fruitcolor” worked as expected (it accessed the fruitcolor value and compared it with my value of “red” - right? I mean is that how that worked) and why Params.fruitcolor (without quotes) failed. I was experimenting with .Params, Params, $section.Params as well (and all were failing).

After getting the idea that I needed to use Quotes, the following worked -

{{ $section := where site.Pages "Section" "fruits"}}
	<p>Number of Red Fruits:
		{{ len (where $section "Params.fruitcolor" "==" "red") }}</p>

And of course, this single statement with nested where did work as well.

{{ where (where site.RegularPages "Section" "fruits") "Params.fruitcolor" "red" | len }}