public int getDefinedCount(Argument... ofThese) {
    if (ofThese.length == 0) {
      return values.keySet().size();
    }

    int count = 0;
    for (Argument arg : values.keySet()) {
      boolean found = false;
      for (int i = 0; !found && i < ofThese.length; i++) {
        if (ofThese[i].equals(arg)) {
          count++;
          found = true;
        }
      }
    }
    return count;
  }
Counts the number of arguments defined on the command line which are in the list provided.

@param ofThese the arguments to search for, or null to count all supplied arguments
@return count of the defined arguments
extensions/geode-modules-session/src/main/java/org/apache/geode/modules/session/installer/args/ArgumentValues.java