То, что вы хотите, это
{% for item in item_list %}
{{ forloop.counter }} {# starting index 1 #}
{{ forloop.counter0 }} {# starting index 0 #}
{# do your stuff #}
{% endfor %}
{{ forloop.counter }} {# The current iteration of the loop (1-indexed) #}
{{ forloop.counter0 }} {# The current iteration of the loop (0-indexed) #}
Также имейте в виду
{{ forloop.first }} {# True if this is the first time through the loop #}
и
{{ forloop.last }} {# True if this is the last time through the loop #}