code: private int evaluateCountExpression(Object value) {
          if (value == null) {
              return 0;
          }
          if (value.getClass().isArray()) {
              return Array.getLength(value);
          }
          if (value instanceof Vector<?>) {
              return ((Vector<?>) value).size();
          }
          return 1;
      }
docs: Evaluates the count expression function. If the value is null, then 0 is
  returned. If the value is an array, the length is returned. If the value
  is a vector, the size is returned. Otherwise, 1 is returned.
  
  @param value the value to evaluate
  @return the count of the value