Object counter « counting box »

All your variables are declared as (2-byte) integers. Pin numbers and such can't go higher than 255, or be negative, and so can be byte size, uint8_t or unsigned char.

Same for the boolean variables, they can be declared as type bool and only occupy one byte. This also aids comprehension - if you know something is a bool then you know it can only be in one of two states, true or false.

This is why you might see something like [color=blue]if(lastButtonStateFC51)[/color] instead of [color=blue]if(lastButtonStateFC51 == true)[/color]. They function alike it's just a bit of programming shorthand.