code: public CountQueryResult executeCount() {
  		CountQueryResult ret = new CountQueryResult(this);
  		Object so = this.queryExecutor.getMappingInfo().getInternalDomainAccess().getSyncObject();
  		if (so != null) {
  			synchronized (so) {
  				this.queryExecutor.executeCount();
  			}
  		} else
  			this.queryExecutor.executeCount();
  		return ret;
  	}
docs: Retrieve the count for every DomainObjectMatch of the query
  in order to support pagination
  @return a CountQueryResult