Einfacher gehts so:
PHP-Code:
<?php
$hits 
file_get_contents('counter.txt');
file_put_contents('counter.txt', ++$hits);
?>