There is two way to get record count from the Store
This function depend on server response value. For accuracy of the value, property shell if return by the server.
Property name for the diff. reader:
Will return you the number of record from the store.
Or if you have filter on the store, it will give you the number of filtered record.
But if you want to get the total number of record regardless filtering, Then it will be like this
var totalRecords = store.snapshot ? store.snapshot.length : store.getCount();
“snapshot” is the variable in “Store” which hold the actual data in case if you have applied a filter.