timing within a loop

hi there think i have figured it now

int ledPin =  13;    // LED connected to digital pin 13
int button = 2;      // button pin

int count = 0;       // Our blink counter

// The setup() method runs once, when the sketch starts

void setup()   {                
  // initialize the digital pin as an output:
  pinMode(ledPin, OUTPUT); 
  pinMode(button, INPUT);  
}

// the loop() method runs over and over again,
// as long as the Arduino has power

void loop()                    
{
  if (digitalRead(button)== HIGH)  // buttin when high
  {
  if (count < 1) {
    digitalWrite(ledPin, HIGH);   // set the LED on
    delay(1000);                  // wait for a second
    digitalWrite(ledPin, LOW);    // set the LED off
    delay(1000);                   // wait for a second
    
    count++;  // add one (1) to our count
  }
  }
  else {
    if(count == 1) count =0;       // resetting the count 
  } 
}