How About this?
<?php
  $cnt_file 
'/tmp/'.basename(__FILE__).'.cnt';;
  
$fp fopen($cnt_file'a');
  
fwrite($fp,chr(65+date('H')));
  
fclose($fp);
  
$num filesize($cnt_file);
  echo 
"File has been accessed $num times";
?>
Output
File has been accessed 11 times