fix(pagination): handle extreme values for `total-items`

Closes #1104