Web >> Development >> Shopify >> Liquid >> How to increment a counter variable



{% assign count = 0 %}

{% for something in somethings %}
  {% assign count = count | plus: 1 %}
{% endfor %}

{{ count }}