Program counts upward on falling edge on pin PTG0. Counts are stored in variable Counter. When 10 counts are detected KBI is disabled and no more actions are executed.