How can I, in between there, when I touch the button the second time, instead of turning the LEDs off, I want to make the LEDs blink, and then with the third touch of the button I want to turn them off. How can this be achieved?
First, I'd suggest that you re-read all the replies so far. You are incrementing the counter too often/incorrectly.
Separate the need to increment the counter from the actual counter value.
Clearly, you need more valid buttonPressed values (0, 1, and 2), and you need an else if case to handle the (new) buttonPressed == 1 case.
Inside that block, do not even consider putting a call to delay(). Look at the blink without delay example.