Fixed total pages counting issue
Implemented total_records method