If the user request a web page from my website, how the index.py will be called
Are you sure you're still talking about the same problem as before? Do you really need to mix perl, python and php?
And can you not actually avoid calling an external program, and do the counter updating in Perl? If not, what prevents you? <bllockquote> so that it know for WHAT webpage he need to add, display counter?
Usually by passing command line arguments, or setting environment variables. But of course that depends on how the called script expects to get its arguments.