I always put the counter in a module, that makes it Template and Joomla Update indepenend.
First Login to your admin panel.
Disable the Wysiwyg editor for now. (sometimes you need to do this an a user level as wel.)
Go to the module menu and create an new one.
Name it like Statcounter or something you can remember.
Tick the don't show Title if you dont want to show it.
Set the placement on your menu left or right and publish to on.
Now copy your statcounter code into the module Content pane.
save the module and look if it shows up in your site.
Best part of this solution is that it also works with a hidden counter, just make sure the modul is published.
You are now Template indepented, so if you chance your template the counter still works without modicactions.
Now you can enable the Wysywig editor again.
If you need to alter or insert new code, make sure you are editing without the Wysysiwig editor.
Explanation with screen schots..http://www.hummerbie.com/Free-Online-Services/How-to-put-Statcounter-into-Joomla.html