You're wrong. That line of code is just to create something random, he could have used rand() if he wanted to, but it's not as "random".
And if you take a look in the .htaccess file, you'll notice that the images request also goes to index.php.
And if you take a look in the .htaccess file, you'll notice that the images request also goes to index.php.
I just tested it by changing my IP while staying in the same browser session. After an IP change the page only displays '1' for the number of visits, exactly as you would expect when reading the code (since the E-Tag for the image is kept (and the image request updates the counter), but the index.php uses your IP+UA combo to determine the session). This code is flawed and doesn't do a thing.