Updated total page calculations