Access Childpage Index in Collection Loop

If I’m looping through a collection of modular pages, how can I access the index of the child page in the collection array from the modular template?

The loop in page.html.twig

    {% for childpage in page.children %}
        {{ childpage.content }}
    {% endfor %}

And the childpage modular template in modular/childpage.html.twig:

{{ content }}
<!-- this is where I need the current index in the collection array -->

I know without context of the markup around the modular template it seems redundant, but I just needed to establish the bare-bones setup.

Is this what you are looking for? http://twig.sensiolabs.org/doc/tags/for.html#the-loop-variable

Yes, the loop.index is what I’m looking for, but my question in this context is how to pass the loop.index as a var to the modular template — does that make sense?

So something like:

{% for childpage in page.children %}
        {% set childIndex = loop.index %}
        {{ childpage.content }}
    {% endfor %}

And then in the modular/childpage.html.twig template:

 {{ childIndex }}

(which doesn’t work)