How to program a pulse counter that is reset by another pulse

Counting pulses is something that interrupts were invented for. Here's an example that I had. You'll have to modify it to use LCD instead of Serial.

volatile int PulseCount = 0;

void Interrupt0Handler()
{
  ++PulseCount;
}

void Interrupt1Handler()
{
  PulseCount = 0;
}

void setup()
{
  pinMode(2, INPUT);  // Interrupt 0  on the Uno
  pinMode(3, INPUT);  // Interrupt 1 on the Uno
  attachInterrupt(0, Interrupt0Handler, RISING);   // Digital Pin 2 on the Uno
  attachInterrupt(1, Interrupt1Handler, RISING);   // Digital Pin 3 on the Uno
  Serial.begin(9600);
}

void loop()
{
  static int LastPulseCount = 0;

  if (LastPulseCount != PulseCount)
  {
    LastPulseCount = PulseCount;
    Serial.print("PulseCount = ");
    Serial.println(LastPulseCount);
  }
}