I'm interested in writing a program (or possibly using another means) to update a counter every time I visit a specific domain, say "wikipedia.org" or "twitter.com", from any browser. As far as I can tell, no such program exists. The problem is that I don't know where to begin: I don't know how an external program would be able to tell when a browser requests a page from a given domain.
Ideally, I would like to store this value in a simple text file, for example:
twitter.com = 123
wikipedia.org = 456
The program will run in the background and update the file each time one of the domains is visited.
I am open to other solutions-- perhaps it can be done from within the browser, or maybe this data is already stored somewhere and I just need to process it.