There are lots of websites that will create free webcounters.
I like http://www.hitwebcounter.com/webcounter.php as there is no sign-up required.
The pupil just needs to choose the required style and number of characters, and the code is generated automatically, ready to be inserted into the page.
However these will only work on pages that are actually on a webserver – but there’s nothing to stop pupils faking it when they generate the code.