Print Drupal Statistics in node template? When the (core) statistics module is enabled, we get a '50 reads' at the bottom of each node.

Is there any way I can pull that '50' (the node view count) and print it in a node template?

I want to accomplish this without a contribute module.

Any ideas?
The statistics module provides that data through statistics_get(), which returns

An associative array containing:

totalcount: Integer for the total number of times the node has been viewed.
daycount: Integer for the total number of times the node has been viewed &quot;today&quot;. For the daycount to be reset, cron must be enabled.
timestamp: Integer for the timestamp of when the node was last viewed.


e.g.
$stats = statistics_get($nid);
$total_count = $stats['totalcount'];
$day_count = $stats['daycount'];

To get it into a node template, implement hook_preprocess_node(), hook_node_view_alter(), or hook_node_view() (the latter will need to be in a custom module, the other 2 can go in a theme or module).
hook_preproces_node() example:
function MYTHEME_preprocess_node(&amp;$vars) {
  $stats = statistics_get($vars['node']-&gt;nid);
  $vars['stats_total_count'] = $stats['totalcount']; 
}

And in the template
&lt;?php echo $stats_total_count; ?&gt;

You'll need to clear Drupal's cache after adding the hook so the theme registry picks it up.