HTML, Ajax, JavaScript... question

You can use some code similar to what I proposed to "hit" some image counter service. And then display the image in the page.