Run a plugin just ‘once’ per page reload

Basic idea is to use javascript to make an AJAX call back to the site which in turn save the hit because if you use PHP alone, then hits for cached pages won’t be counted because no PHP is processed at that time.

Study the code of WP-Postviews plugin http://lesterchan.net/portfolio/programming/php/#wp-postviews

Edit:

Hook may be fired twice in Firefox because it prefetches URL specified in HTML source as

<link rel="next" href="http://www.domain.com/adjacent-post/" />

Use this to remove that line from source

remove_action('wp_head', 'adjacent_posts_rel_link_wp_head');

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)