Is hook_node_view() invoked every time?
Drupal core provides the statistics module which does basically this. It just maintains a counter and not a record per visit, but that's the basic idea.

And it does that with JS that triggers a callback. The reason it does it like that is that nothing on the server side can reliably do this in many situations. You might have something like varnish in front of your site, then most requests will not even reach your webserver.