you could try using a data file instead of the data base to set your count.. this is a very simple example of a counter that i wrote for a test page:
<?php
// Access counter
$counter = 0;
$fs = fopen("count","r");
$counter = fgets($fs, 26);
fclose($fs);
$counter = (integer)$counter +1;
$fs = fopen("count", "w+");
fwrite($fs, $counter, 26);
fclose($fs);
echo "$counter people have visited this page.";
?>
The name of the data file in the dir is: count