New way to fix total pages with custom limit and offset