flock

Added flock on count.txt file to prevent multiple access corrupting the
file on busy sites.  Lock and open errors will be added to the log file.