Well you could just put the count of each click into your links.
if (!isset($link1)) { $link1 = 0; }
if (!isset($link2)) { $link2 = 0; }
<a href="page.html?link1=$link1++&link2=$link2">Link1</a>
<a href="page.html?link1=$link1&link2=$link2++">Link2</a>
As long as these links are calling the page that they are on you will get an accurate count as to how many times each one has been pressed. But if the user goes somewhere else and then comes back to this page it will start all over again. If you want to keep the data in this situation then you are going to need to use session variables.
session_start();
if (!isset($link1)) { $link1 = 0; }
if (!isset($link2)) { $link2 = 0; }
session_register("link1");
session_register("link2");
<a href="page.html?link1=$link1++&link2=$link2">Link1</a>
<a href="page.html?link1=$link1&link2=$link2++">Link2</a>
Now as long as the page called by the links has the session_start() and session_register() functions from above you will get an accurate count even if they leave your site and come back (until garbage collection happens). Plus with using sessions you don't need to pass both variables via the query string. You don't even have to pass 1 of them if your links go to different pages.