From http://wpsnipp.com/index.php/functions-php/track-post-views-without-a-plugin-using-post-meta/