{% set y= 0 %}
    {% if döngüsü %}
        {% set y= y+ 1 %}
    {% endif %}
Böyle denediniz mi hiç hocam?