code: @Override
      protected int delegateSelectCountUniquely(final ConditionBean cb) {
          // #pending check response and cast problem
          final SearchRequestBuilder builder = client.prepareSearch(asEsIndex());
          final EsAbstractConditionBean esCb = (EsAbstractConditionBean) cb;
          if (esCb.getPreference() != null) {
              builder.setPreference(esCb.getPreference());
          }
          return (int) getSearchHits(esCb.build(builder).execute().actionGet(searchTimeout)).getTotalHits().value;
      }
docs: ======