static int iteratorCount_int(Iterator i) { int n = 0; if (i != null) while (i.hasNext()) { i.next(); ++n; } ret n; }