That's what it is supposed to do. The counter logs pageloads on every page that has the counter script in them, and the number is summary total for the whole site. You can choose to show visitors or hits on the visible counter, but hits on specific pages are on "Popular pages" and only for the hits within the current log (100 for free account) that will roll off when the log is filled and new pageloads is added.
I've changed the index.php script to the following but its still not tracking the visits.
<!-- Start of StatCounter Code -->
<!-- End of StatCounter Code -->