Resetting Arduino after pressing the buttons 16 times

You can find explanations of if-else and a lot more here: