Is there the last loop counter

How to use the last loop counter in if_v2

Thank you so much

Initialise variable

use while loop with condition till you want variable

increment variable at end of while loop

Alternatively
use times command