count=new GraphFlattener(str).getNumTiles();
count=Partitioner.countTilesNeeded(str, joinersNeedTiles);
    public SIRStream toplevel() {	int count=new GraphFlattener(str).getNumTiles();	System.out.println("  GreedierPartitioner detects " + count + " tiles.");	boolean cont;	do { //Iterate till can't (# fissable filters is always decreasing)	    cont=false;	    boolean fiss=shouldFiss(); //Try Fiss	    while(fiss&&count<numTiles) {		cont=true;		Node big=(Node)nodes.lastKey();		System.out.println("  Fissing: "+big.filter);		fiss(big);		count=new GraphFlattener(str).getNumTiles();		fiss=shouldFiss();		System.out.println("  GreedierPartitioner detects " + count + " tiles.");	    }	    while(count>numTiles) { //Try Fuse		cont=true;		//Pair smallest=(Pair)pairs.firstKey();		Pair smallest=findSmallest();		fuse(smallest);		count=new GraphFlattener(str).getNumTiles();		System.out.println("  GreedierPartitioner detects " + count + " tiles.");	    }	} while(cont);	return str;    }