Fixing the totalPageCount when there are no items