register a click and increment a counter