Pagination 'count' is not accurate if the SQL query result contains duplicate id's - Ash Framework