I would think include() should do it. If you just go to domain.com/cgi-bin/counter.cgi in your browser, does the counter increment?
What about your allow_url_fopen and allow_url_include ? You'd have to have those turned on in include() or fopen() a URL.
hth
