code: protected <X> long calculateTotal(Pageable pager, List<X> result) {
  		if (pager.hasPrevious()) {
  			if (CollectionUtils.isEmpty(result)) {
  				return -1;
  			}
  			if (result.size() == pager.getPageSize()) {
  				return -1;
  			}
  			return (pager.getPageNumber() - 1) * pager.getPageSize() + result.size();
  		}
  		if (result.size() < pager.getPageSize()) {
  			return result.size();
  		}
  		return -1;
  	}
docs: Calculate total mount.
  @return if return -1 means can not judge ,need count from database.