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

Did you find a solution for this? if so please share