Ways to count number values in a template variable

I have created an variable in Templating $foo, which get values from a query, so the number of values in that variable differs. I want to count values in some way and display it in some graph, is there any ways I can achieve this ?

1 Like