I need to use the touch object and I will have more than 2 images (6 or 10 in total) by always clicking on two at a time. Can I use the same script with touch and with more instances than 2?
You can do the same thing with touch instead of mouse.
You should be able to adapt this to different conditions. If you are adding up a varied amount of numbers I would just make a global variable and add the instance variable to the global variable.
I'm not really sure what you are asking or what your scenario is specifically, but I would rather you ask questions based on understanding rather than tailoring to your scenario. If you don't understand I may be able to make a capx example tomorrow to show you but I won't write your code for you.