title: How to count variable +1 in Liquid
body: <p>I am completely stumped by how to count plus one towards a variable assigned via <code>{% assign var = 0 %}</code>. It should be the most simple task. Here's what I've tried so far:</p>
  
  <pre><code>{% assign amount = 0 %}
  {% for variant in product.variants %}
      {% assign amount = amount + 1 %}
  {% endfor %}
  
  Amount: {{ amount }}
  </code></pre>
  
  <p>The result is always <code>0</code>. Maybe I'm overlooking something obvious. Maybe there is a better way altogether. All I want to archive is getting the number of iterations that are run.</p>