bueno, propongo algo así
Código PHP:
Ver original<?php
$clicks = 1;
?>
<html>
<script>
function test(){
document.getElementById('clics').value = parseInt(document.getElementById('clics').value) + 1;
}
</script>
<body>
<img src='http://imagen.ext' onclick='test()'>
<input type='text' name='clics' id='clics' value='<?php echo $clicks;?>'>
</body>
</html>
prueba y comenta
saludos