Bricks\Query::get_loop_index()

WordPress Function

Official Docs