Save the state of the button in a variable. Then only when the current button state is different from the remembered state increment another variable. Then flash the LED depending on if that variable is odd or even.
To find if a variable is odd look at the least significant bit with:-
if((var & 0x01) !=0) { // it’s odd }
else
{ // it’s even }