Hello Shailav,
Aside: this looks like code from SDK v9.1. On nxp.com you can now download SDK v10.
You can increase the number of the storage samples by switching to a release build - if you are able to store about 4000 samples it looks like your firmware image is very big, which indicates you are using a debug build.
As IvanRuiz already pointed out: using the storage module will make use of both EEPROM and FLASH. A call to Storage_Write will write too EEPROM, but when that is full (and only then), all data is dumped to FLASH, making room for more samples. A smaller firmware image will thus allow you to write more samples in non-volatile memory.
Note that you can control which amount of EEPROM the storage module is allowed to use for storing data by adjusting or defining STORAGE_EEPROM_FIRST_ROW and/or STORAGE_EEPROM_LAST_ROW. See storage_dft.h or the documentation at docs/FirmwareDevelopmentDocumentation/index.html.
If you want to delete old samples - while still using the storage module - you can do so by defining STORAGE_COMPRESS_CB and implementing a lossy compression algorithm. This callback is called each time EEPROM is full, just before moving data to FLASH. The current tlogger demo is using a lossless compression algorithm to demonstrate the technique, but you can differentiate by making your own 'compression' - deletion can be viewed as a heavy kind of lossy compression :-)
Of course, you cam also just stop using the storage module and implement your own logic on top of the EEPROM driver that does precisely what you want.
Kind regards,
Dries.