Insert value to field programmatically and remove cache from field
I also think you could use an integer field on the node for this - but keeping that aside, the  problem you are facing (the inserted value not being refreshed by the cache) is caused by the fact that you are trying to write in the database table field_data_field_hit_count_node directly. This is definitely discouraged, and you should be using the proper API instead.

Instead of db_merge('field_data_field_hit_count_node')-&gt;...-&gt;execute() you would want to do something like:

$node-&gt;field_hit_count_node[LANGUAGE_NONE][0]['value'] = $val[0]-&gt;totalcount;
$node-&gt;save();


Doing it this way ensures that the saving is done by Drupal, the caches are cleared as required, hooks as called as necessary, etc. 

In addition if you don't mind using the entity module, then you can do this with Entity Metadata Wrappers in a simpler way:

$nw = entity_metadata_wrapper('node', $node);
$nw-&gt;field_hit_count_node = $val[0]-&gt;totalcount;
$nw-&gt;save();