How to use the inbuilt Arduino UNo EEPROM?

I want to store a 5 digit count at a particular location of the Arduino Uno EEPROM. With the help of a circuitry I am counting IR pulses and then comparing them with the set count in the Arduino memory. I tried implementing the basic EEPROM write function by trying to store the count 1000 at address location 1 and when I checked on the serial monitor it shows the number 232 at that location. It seems some kinda equivalent of 1000. I’m not able to determine the datatype I must use.

Help will be appreciated. Following is the code I’m using to write the count.

#include <EEPROMex.h>

int address = 1;
int input = 1000;
int output = 0;

void setup()
{
Serial.begin(9600);
EEPROM.write(address, input);
output = EEPROM.read(address);
Serial.print(address);
Serial.print("\t");
Serial.print(output);
Serial.println();
}

void loop()
{ // Nothing to do during loop
}

Why not use EEPROM.put() and EEPROM.get() ?

#include <EEPROM.h>

int address = 0;
int input  = 1000;
int output = 0;
 
void setup()
{
  Serial.begin(115200);  
  EEPROM.put(address, input);  
  EEPROM.get(address, output);
  Serial.print(input);
  Serial.print("\t");
  Serial.print(output);
  Serial.println();  
}
 
void loop()
{  // Nothing to do during loop 
  }

UKHeliBob is right, but here is the explanation.
The EEPROM can only store bytes and not ints. You stored 1000, that is 3*256+232. The data was truncated to 232 which is what you read back. Read the documentation of the EEPROM library

I am sure that there was a post explaining the problem and offering a solution before I posted mine, hence I offered no explanation of the problem. The post would appear to have been removed.

Thanks for pointing out..Would you please elaborate regarding the solution?

olf2012:
UKHeliBob is right, but here is the explanation.
Read the documentation of the EEPROM library

You should read the documentation. EEPROM.put() and EEPROM.get() can handle multibyte data.

GautamD:
Thanks for pointing out..Would you please elaborate regarding the solution?

As suggested, read the documentation but here are a couple of comments added to the code

  EEPROM.put(address, input);  //save the contents of the input variable to the address location in the EEPROM 
                                  //using as many EEPROM locations, each 1 byte, as required to save a variable of that type.  
  EEPROM.get(address, output);  //read the data at EEPROM location address into the previously declared output
                                    //variable reading as many bytes as necessary to load a variable of the type
                                   //declared for the output variable
I could only write and read  a 4 digit number, in this case I used a max 4 digit number 9999. I want to write and read a 5 digit number to max value 99999. The code I implemented is as follows:

[#include <EEPROMex.h>
 
int address = 1;
int input  = 9999;
int output = 0;
//byte lowByte,highByte;
//byte outputl,outputh;
 
void setup()
{
  Serial.begin(9600);  
  EEPROM.writeInt(address, input);
  //lowByte = ((input >> 0) & 0xFF);
  //highByte = ((input >> 8) & 0xFF);

  //EEPROM.writeInt(address, lowByte);
  //EEPROM.writeInt(address + 1, highByte);
      
  //outputl = EEPROM.read(address);
 output = EEPROM.readInt(address);
  Serial.print(address);
  Serial.print("\t");
  Serial.print(output);
  //Serial.print(outputh);
  Serial.println();  
}
 
void loop()
{  // Nothing to do during loop 
  }]

Why don't you use the EEPROM library supplied with the IDE as illustrated in reply #1 ?