here is a way to do it.
PHP Code:
function add_one(){
$link=mysql_connect("localhost","username","password") or die("Error Connecting"); 
        
$DB=mysql_select_db("test"); 
//get the number in the database 
        
$SQL mysql_query("select hits from tablename")or die("Exit");  
//then add one to it and put it back in
while ($row mysql_fetch_array($sql)) {
          
$count_entree=$row["hits"];
        }
        
$count_entree++;
        
mysql_db_query ($db"INSERT INTO tablename (hits) VALUES ('$$count_entree')");

then in your link have this
onClick=add_one();

very rough but you should get the idea.