docs: public long count(String field, Object val) throws PersistenceException {
          logger.debug("enter - count(String,Object)");
          try {
              if( logger.isDebugEnabled() ) {
                  logger.debug("For: " + cache.getTarget().getName() + "/" + field + "/" + val);
              }
              
              Class<? extends Execution> cls;
              
              SearchTerm[] terms = new SearchTerm[field == null ? 0 : 1];
              
              if( field != null ) {
                  terms[0] = new SearchTerm(field, Operator.EQUALS, val);
              }
              
              String key = getExecKey(terms, false);
              Map<String,Object> params = toParams(terms);
              
              synchronized( this ) {
                  while( !counters.containsKey(key) ) {
                  	
                      compileCounter(terms, counters);
                      try { wait(1000L); }
                      catch( InterruptedException ignore ) { /* ignore this */ }
                  }
                  cls = counters.get(key);
              }
              if( cls == null ) {
                  throw new PersistenceException("Unable to compile a default counter for field: " + field);
              }
              return count(cls, params);
          }
          finally {
              logger.debug("exit - count(String,Object)");
          }
      }