text: public static int countArg(ValueEval eval, I_MatchPredicate criteriaPredicate) {if (eval == null) {throw new IllegalArgumentException("eval must not be null");}if (eval instanceof ThreeDEval) {return countMatchingCellsInArea((ThreeDEval) eval, criteriaPredicate);}if (eval instanceof TwoDEval) {throw new IllegalArgumentException("Count requires 3D Evals, 2D ones aren't supported");}if (eval instanceof RefEval) {return CountUtils.countMatchingCellsInRef((RefEval) eval, criteriaPredicate);}return criteriaPredicate.matches(eval) ? 1 : 0;}