Jinja has loop.index (1-based) and loop.index0 (0-based)