Do you have scripting enabled? Well, the best way to solve this is with that, but it can be done without it. I assume you have created the variable, right? Well, on a page, the links shown below have various different icons in front of them (a stopsign, an inventory bag, a plus and more), you should learn what each of these does, as it causes either changes to things like variables and items, or causes the link to be restricted (such as if the variable MRBLAHBLAH is 0, and not 1, you cannot use the link "Talk to Mr. Blahblah", because the fact that the variable representing him is 0 represents the fact that you haven't got him with you). Anyway, one of the icons in front of each link is a plus, select that to determine changes in variables when the particular link is clicked.
If you have scripting (remember that the icon ":=" represents scripting) enabled, then you can either open the script for that individual page (by clicking the before-mentioned icon on that page, opening a new window where you can type scripting in for that page) and have the variable change there, then the link clicked does not matter for this, because the variable changes nontheless. If you click that same icon, but this time at a link (one of the icons that appear before a link on all pages), you can do the same thing. In order to have the variable decrease using this, you must type:
%VARIABLE := %VARIABLE - 1
Into the scripting browser that appears.