Have you looked into drag and drop behavior? You can define a drop area and an item that is a draggable element. You can then detect when an element is dragged over the top of the defined droppable area and then add or subtract from variables.
I struggled a little bit to understand your question, so forgive me if I am misunderstanding.