So you want to increment the value of a text field each time a button is clicked? That's certainly possible.
You can use something like this script as the Mouse Up event of the button. Let's assume the name of the text field is "Counter".
var f = this.getField("Counter");
f.value = Number(f.valueAsString)+1;