try this, instead of redirecting the user to the full size image, redirect them to a page that records the view (ie a text file or database) then redirect them to the image like this:
header("location:image.jpg");
then to display the views, just open the file or database and read the results. If your going to have a lot of images, I'd go with a database. Flat files can be a bit much to maintain.
HTH