Using Quad Encoder to Track RPM of motor

This is the code I currently have.
This code can currently track the number of revolutions made by the motor shaft. When I implement the pulses = o after the delay in the loop everything just seems to become zero. I need a way to get rpm or rps.

#include <Wire.h> //Libraries for i2c communication
#include <LiquidCrystal_I2C.h> //Libraries for LCD
LiquidCrystal_I2C lcd(0x27,16,2); // set the LCD address to 0x27 for a 16 chars and 2 line display
// The pins the quadrature encoder is connected.
// We connect the second signal of the encoder to pin 4.
// int.1 is free for other use.
int in_a = 2;
int in_b = 4;
long rpm = 0;
// The number of pulses per revolution
// depends on your index disc!!
unsigned int pulsesperturn = 300;

// The total number of revolutions
long revolutions = 0;
long c = 1;

// Initialize the counter
volatile long pulses = 0;

void count() {
// This function is called by the interrupt
// If in_b is HIGH increment the counter
// otherwise decrement it
if (digitalRead(in_b)) {
pulses++;
}
else {
pulses--;
}
}

void setup() {
pinMode(in_a, INPUT);
Serial.begin(9600); //Starts serial communication at 9600 bps
pinMode(in_b, INPUT);

attachInterrupt(0, count, RISING);
lcd.init();// initialize the lcd
lcd.backlight(); //turn on the backlight
}

void loop() {
revolutions = pulses/pulsesperturn;
rpm = revolutions;
Serial.println(pulses);
Serial.println(revolutions);
lcd.setCursor(0,0); //Sets line 1 cursor position
lcd.print("RPM"); //Displays line 1 text
lcd.setCursor(1,1); //Sets line 2 cursor postion
String line = String(rpm);
lcd.print(line+ " "); //Display line 2 text
delay(1000);
//pulses =0;
}

  rpm = revolutions;

No, revolutions per minute (rpm) does not equal revolutions.

When I implement the pulses = o after the delay in the loop everything just seems to become zero.

How many pulses arrive between the time you set pulses to 0 and loop() ends and restarts?

Put the pulses = 0 statement BEFORE the delay()!

The encoder counts will not increment during the delay() and there is no need to use it in this sketch. If you want to manage the display update, you need to follow the approach of "Blink without Delay" in the 02.Digital examples.

For rpm/rps you will need to either count a fixed number of pulses (or revolutions) and divide by the time period over which they occur, or count the number of pulses or revolutions which take place in a fixed period of time.

Why do you need to set pulses to 0? Just calculate the difference between the value of pulses now and what it was at an earlier time - the same way that millis() is used.

...R

The encoder counts will not increment during the delay()

They most certainly will. The only thing that happens during delay() is that interrupts get processed. And, that is what you are relying on. Setting the number of pulses back to zero, and then, nanoseconds later, expecting the number of pulses to be something other than zero is, shall we say, stupid.