Up Down Counter design based on Arduino MEGA compatible
The code is actually a modified version of a countdown timer, see this link. Keypad matrix debouncing is dealt with by inserting a short delay between each keypad scan.
In case multiple digits being received with single key pressed modify delay() function. A relay or solid state switch can be added to A0 if higher output current is needed.