class ASTCountMatches extends ASTPrim {
@Override int nargs() { return 1+2; } // (countmatches x pattern)
@Override String str() { return "countmatches"; }
@Override ValFrame apply( Env env, Env.StackHelp stk, AST asts[] ) {
Frame fr = stk.track(asts[1].exec(env)).getFrame();
<BUG>String pattern = asts[2].exec(env).getStr();
if (fr.numCols() != 1) throw new IllegalArgumentException("countmatches requires a single column.");</BUG>
final int[] matchCounts = countMatches(fr.anyVec().domain(),pattern);
Frame fr2 = new MRTask() {
@Override public void map(Chunk[] cs, NewChunk[] ncs) {

class ASTCountMatches extends ASTPrim {
@Override int nargs() { return 1+2; } // (countmatches x pattern)
@Override String str() { return "countmatches"; }
@Override ValFrame apply( Env env, Env.StackHelp stk, AST asts[] ) {
Frame fr = stk.track(asts[1].exec(env)).getFrame();
String[] pattern;
if( asts[2] instanceof ASTStrList ) pattern = ((ASTStrList)asts[2])._strs;
else                                pattern = new String[]{asts[2].exec(env).getStr()};
if (fr.numCols() != 1) throw new IllegalArgumentException("countmatches requires a single column.");
final int[] matchCounts = countMatches(fr.anyVec().domain(),pattern);
Frame fr2 = new MRTask() {
@Override public void map(Chunk[] cs, NewChunk[] ncs) {
