PulseSensor Countdown

You need some level of hysteresis, just switching at 550 (or any one value) has the risk of false signals if the output hovers around that value.

Instead of checking HIGH or LOW on a digitalRead, do an analogRead() and state checking.

bool lastState = LOW;
void loop() {
  bool sensorState;
  int result = analogRead(sensorPin);
  if (result > 600) sensorState = HIGH; // HIGH signal if >600.
  else if (result < 500) sensorState = LOW; // LOW signal if <500
  else sensorState = lastState; // Between these values: whatever the previous signal state was.

  if (sensorState == HIGH && lastState == LOW) {
    // Beat detected!
    beatCounter++;
  }
  lastState = sensorState;
}

Amend the 500 and 600 values to suit your sensor's output, and desired amount of hysteresis (larger hysteresis = greater stability; lower hysteresis = greater sensitivity).