If your data is comming from Database., and and to I assume it is that you can write a simple query that returns the total number of records in the table.
If your data is comming from Database and I assume it is then you can write a simple query that returns the total number of records in the table.