new to programing need help with a code

Hello world

I'm new to programing and have I a small code writen and I works fine except for a small bit.
I'm trying to didplay a number and when a button is pressed it ads one to that number and displays it up to ten. Then if you press another number it subtracts one and displays it.

The error I'm coming into is when I press the "ADD" button it adds one the the second time you do it, it might add one or subtract. The "SUBTRACT" button does the same thing but in reverse.
Any help would be appreciated.
All buttons are connected with pull down resistors
Code

int nextPin = 2;
int lastPin = 3;
int i = 1;

void setup ()
{
Serial.begin (9600);

pinMode (2, INPUT);
pinMode (3, INPUT);

Serial.println("select your number");
Serial.println (i);

}

void loop (){
If(digitalRead (nextPin) == HIGH){
delay (150);
i++;
Serial.println (i);
delay(250);
}

if(digitalRead (lastPin)== HIGH){
delay(150);
i--;
Serial.println(i);
delay(250);
}
}

You don't want to add (or subtract) when the switch IS pressed. You want to add when the switch BECOMES pressed.

Look at the state change detection example.