if(numberOfObjectsPerBatch() == 0) { return 0; } if(rowCount() == 0) { return 1; } else { return (rowCount() - 1) / numberOfObjectsPerBatch() + 1; }
return _batchCount;
    public int batchCount() {        if(isBatching()) {            if(numberOfObjectsPerBatch() == 0) {                return 0;            }            if(rowCount() == 0) {                return 1;            } else {                return (rowCount() - 1) / numberOfObjectsPerBatch() + 1;            }        }        return super.batchCount();    }