Rewriting counter script.

I prefer object structures now.
Use root path, not full domain.