Firstly its:
<?php
include ("counter.php");
?>
Secondly you put it at the top of the page and make sure the page is a .php file instead of a .html file! The HTML will still work even though its in a .php file, but the PHP wont work if its in a .html file!