Changing int numbers with external means

but is this correct?

No, the code you posted not correct in several ways.

  1. You need to digitalRead() the input pins instead of using conditional tests on the pin numbers. The numbers 5 and 6 will always be HIGH.
  2. You need to register state changes(went HIGH or went LOW) rather than state(HIGH or LOW) when working with button inputs and counting.

I'm sure these principles apply to tft "buttons" as well as physical ones.

If you can get a button to successfully change a number, the changed number an be used by the program.