Are you doing any error checking on the fopen operations?
If you get even one failed open for read your resulting integer will be 0, which could then subsequently be written to the file as a 1 after it's incremented.
It's a very good habit the write your code as:
if ($fileHandle = fopen($countFile, "r")) {
//Code goes here
} else {
//Error handling
}
If you don't have PHP error logs available, you can have your error code append info to a file of your own. This tells you where your operations are failing, and as a side-effect it prevents the failure from hosing your counter file.