This will add a counter to your site, all you have to do is make a file called count.dat (lower case, most are case sensitive about file names) and place the following code where you want the counter to appear :) easy as pie. . . mmmm pie.
<?
//set the count file
$counterfile = "count.dat";
//check the file is readable
if(!($fp = fopen($counterfile,"r"))) die ("cannot open counter file");
//grab the value and increase by 1
$count = (int) fread($fp, 20);
fclose($fp);
$count++;
//show the result, write the new value and close the file
echo "Site Hits: $count";
$fp = fopen($counterfile, "w");
fwrite($fp , $count);
fclose($fp);
?>