pagination. update numPages with rounded number.