Pagination Result Algorithm code int countRecords = ...; int countOnPage = ...; int currentPage = ...;