Yes - this would do what you want. User doesn't have to click - img will be downloaded anyway. If the site you're posting to is concerned about security though, they may filter out html tags you post.
Now, what you do inside tracker.php is your choice - you can store http referer in the database (basic counter on the lines of "if referer does not exist in a database, insert it otherwise increase the counter" - search google on mysql's INSERT ... ON DUPLICATE KEY...).
As to the details of this script - I'm not going to write this for you. This is a php help site, not php scripts for free one.