Multiple activity index variable

I am using multi instance for user task and I need to somehow keep track of the current loop index.

Is there a way to execute a script in between each loop to increase value of index variable so it’s up to date or is there any other solution?

There is an automatic loop counter that will provide you this feature.
Refer: BPMN 2.0 Constructs · Flowable Open Source Documentation

loopCounter is what I think you are looking for.