Prohibit division by zero when calculating pagingCount