Your global variable can’t deal with many items in a gallery using the same variables. As an alternative, you can add a column to your gallery collection to record your custom value:
AddColumns(<galleryCollection>, newColumnToIncrement, 0).
Then, you will create a textbox, which will display the value ‘ThisItem.newColumnToIncrement’. You will also create 2 buttons to increment or decrement that value using your brand new column ‘ThisItem.newColumnToIncrement’:
incrementButton.OnSelect(Patch(<galleryCollection>, ThisItem, {newColumnToIncrement: ThisItem.newColumnToImcrement + 1}))
You can do it the same way for the ‘-‘ button but with - 1 instead.
I hope it resolves your need!
_____________
If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!