how to click a button to increment a counter