How can I get a total count of items in a ForLoop?

Hey Community,

Wanting to get a total items count of a forloop. Can’t seem to figure it out.

For this:

{%- for tag in customer.tags -%}

So, if the customer has say 10 tags, then the count will show “10”. I don’t need an increment counter, just a total tag count.

Any suggestions?

Thanks,
Aaron

You can use .length for it. More information in here.

Kind regards,
Diego