The 'proper' way of doing this would be to have a server side
scripting language (such as PHP), to record the number for your
counter on the server. It could either use a database for this, or
read and write the number to a plain text file on the server.
However, you may also be able to 'cheat', by using a free hit
counter on a special page on your server, and have your internet
program request that special page using the lingo command
free hit counters: