Simplest way would be to create a new TV called
pageviews. You can hide that from the manager user if you want (or even start it with an existing number of views).
Then create a snippet also called
pageviews containing this (not tested):
<?php
// get number of views and add current
$views = $modx->resource->getTVValue('pageviews') + 1;
$viewsTV = $modx->getObject('modTemplateVar',array('name' => 'pageviews'));
// save new number of views to TV
$viewsTV->setValue($modx->resource->get('id'), $views);
$viewsTV->save();
return $views;
Then place the snippet uncached in your template where you want the number of views to appear: