Change starting order of indexOf() from 0 to 1

Currently looping through a collection of images and setting a custom data-order using <?= $images->indexOf($img) ?>. The output is correct, but I would like to change the indexOf() starting position from 0 to 1 so I can use the data-order value to activate hash URLs in a image carousel on other pages.

Is this possible?

Code below:

  <div class="gallery-wrapper">
    <?php

    $images = $page->images();
    foreach ($images as $img):

    ?>
      <div class="gallery-item-wrapper gallery-item-hidden" data-order="<?= $images->indexOf($img) ?>">
        <div class="gallery-item <?= $img->align() ?>">
          <div class="<?= $img->padding() ?>">
            <img class="<?= $img->widths() ?>" src="<?= $img->url() ?>" alt="">
          </div>
        </div>
      </div>
    <?php endforeach ?>
  </div>

Many thanks!

<?= $images->indexOf($img) + 1 ?>

Ah I thought it would be simple, but not that simple :upside_down_face:

Thank you for the help and quick response!