static int countOccurrencesIC(Collection c, S x) { int n = 0; if (c != null) for (S o : c) if (eqic(x, o)) ++n; ret n; }