You can count something using variables.
You may then use the AJAX plugin to connect to a URL (a distant server script) and pass data along.
You may check our How do I FAQ for Construct 2 to the category AJAX.
This will give you access to examples of implementation (some even with distant server files to receive the data you send).
Distant server script files our out of the scope of Construct and these forums; consider making an online search to learn how to write your own files in the script language of your choice that is configured on your server.