I am moving my web site,do I have to change my counter code?

No, you can leave everything exactly as it is. Your code will be able to track from the new location, assuming the site that it is hosted on is accessible to the rest of the Internet. (Intranet sites might be problematic).