the easiest way is probably with a text file
<?php
$fp = fopen("hits.txt", "w+"); // open the hits file and if it doesn't exist, create it
$hits = fread($fp, filesize("hits.txt")); // read how many hits we have
$hits = (int) $hits; // make sure the variable type is an integer
$hits++; // increment the number of hits by 1
fwrite($fp, $hits); // write the newly incremented number to the text file
print $hits; // print out the number of hits
?>