public static int countExampleMatches(List examples, int index, IntegerWrapper matchValue) {
    { int n = 0;

      { TrainingExample example = null;
        Cons iter000 = examples.theConsList;

        for (;!(iter000 == Stella.NIL); iter000 = iter000.rest) {
          example = ((TrainingExample)(iter000.value));
          if (example.input.length() <= index) {
            {
              Stella.STANDARD_WARNING.nativeStream.println("Warning: Bad training example, not enough features.  Needs `" + (index + 1) + "'");
              Stella.STANDARD_WARNING.nativeStream.println("`" + example.query + "'");
            }
;
          }
          else if (Stella_Object.eqlP((example.input.theArray)[index], matchValue)) {
            n = n + 1;
          }
        }
      }
      return (n);
    }
  }