Saving maximum number

I'm reading output from an anemometer and want to save the maximum wind speed as the readings come in. I've thought this through and can't come up with a solution. I want to save an input, then compare it to the next, and display it if is larger. Then, save the larger and compare it again to find the next larger, and so on. Not sure how to do this.
Help is greatly appreciated. Thanks.
Program below:

//This Sketch reads pulses sent by an anemometer
//from a hall effect sensor and calculates miles 
//per hour.

float MPH;
float RPM;
unsigned long startTime;
const byte hallInputPin = 5;
unsigned long elapsedTime = 0;
unsigned long Count = 0;
unsigned long Sense;
unsigned long lastSense;

void setup() {
  pinMode(hallInputPin, INPUT);
  startTime = millis();
  Serial.begin(9600);
}

void loop() {
  Sense = digitalRead(hallInputPin);
  if (lastSense != Sense) {
    lastSense = Sense;
    if (Sense == LOW) {
      Count = Count + 1;
    }
  }
  
  if (Count == 3) {
    elapsedTime = millis() - startTime;
    startTime = millis();
    RPM = 18000 / elapsedTime;
    MPH = RPM * .15;
    Serial.print("MPH = ");
    Serial.println (MPH);
    Count = 0; 
  }
}
if (newValue > maxValue)
{
  maxValue = newValue;
  Serial.print("New maximum: ");
  Serial.println(maxValue);
}

You will need to reset the maximum value to zero every so often, and start over.

I have used 5 minute report/reset intervals to keep track of gusts.

Use this logic: if new value > old value then old value = new value. Reset old value to zero after reporting it or save it in array if you want to log it.