title: A count in a loop
body: <p>Hello i would like do somthing like that:</p>
  
  <pre><code>&lt;?php $count = 0; foreach($a as $v): $count++; ?&gt;
    &lt;?php if ($count%2 == 0): ?&gt;
      ...
    &lt;?php endif; ?&gt;
  &lt;?php endforeach; ?&gt;
  </code></pre>
  
  <p>in twig:</p>
  
  <pre><code>{% for v in a %} 
    {% if ??? is even %}
      ...
    {% endif %}
  {% endfor %}
  </code></pre>
  
  <p>but how can i have a variable evolving with loop ?</p>