private int countConfs(int numMutable, int numRes, /*boolean ligPresent,*/ 
			int strandMut[][], int numRotForRes[], int numRotForResNonPruned[]){
		
		int numTotalRotRed = 0;
		numConfsTotal = BigInteger.valueOf(1);
		numConfsAboveLevel = new BigInteger[numRes];

		int curNumRot;
		
		//Store the number of rotamers for each AA in the current mutation
		//The ligand (if present) is in the last level
		for (int curLevel=0; curLevel<numRes; curLevel++){
			int str = mutRes2Strand[curLevel];
			int strResNum = strandMut[str][mutRes2StrandMutIndex[curLevel]];
			int molResNum = m.strand[str].residue[strResNum].moleculeResidueNumber;
			/*if ((ligPresent)&&(curLevel==(numRes-1))) //the ligand level
				curNumRot = grl.getNumRotForAAtype(curLigAANum);
			else*/
			curNumRot = getNumRot( str, strResNum, curAANum[molResNum] );
			numRotForRes[curLevel] = curNumRot;
			numRotForResNonPruned[curLevel] = numRotForRes[curLevel];
			numTotalRotRed += numRotForRes[curLevel];
			numConfsTotal = numConfsTotal.multiply(BigInteger.valueOf(numRotForRes[curLevel]));
		}
		
		BigInteger numPruned = BigInteger.ZERO;
		int numPrunedThisLevel;
		
		//Count the number of rotamers pruned by MinDEE
		for (int curLevel=0; curLevel<numRes; curLevel++){
			numPrunedThisLevel = 0;
			int str = mutRes2Strand[curLevel];
			int strResNum = strandMut[str][mutRes2StrandMutIndex[curLevel]];
			int molResNum = m.strand[str].residue[strResNum].moleculeResidueNumber;
			for (int curRot=0; curRot<numRotForRes[curLevel]; curRot++){
				//int curIndex;
				/*if ((ligPresent)&&(curLevel==(numRes-1))) //the ligand level
					curIndex = numInAS*numTotalRotamers + curRot;
				else*/
				//TODO: fix rotamerIndexOffset so that it works for multiple strands/multiple rotamer libraries
				//curIndex = curLevel*numTotalRotamers + rotamerIndexOffset[curAANum[molResNum]] + curRot;
				
				if (eliminatedRotAtRes.get(curLevel,curAANum[molResNum],curRot)){
					numPruned = numPruned.add(compPrunedConfsByRot(numRotForResNonPruned,numRes,curLevel));
					numPrunedThisLevel++;
				}
			}
			numRotForResNonPruned[curLevel] -= numPrunedThisLevel;
		}
		
		//Count the number of conformations below each level (flexible residue)
		if (numRes>0)
		numConfsAboveLevel[numRes-1] = new BigInteger("1"); //the last level
		if (numRes>1){
			for (int curLevel=numRes-2; curLevel>=0; curLevel--){
				numConfsAboveLevel[curLevel] = numConfsAboveLevel[curLevel+1].multiply(BigInteger.valueOf(numRotForResNonPruned[curLevel+1]));
			}
		}
		
		numConfsPrunedByMinDEE = numPruned; //set the number of confs pruned by MinDEE
		numConfsLeft = numConfsTotal.subtract(numConfsPrunedByMinDEE);
		numConfsPrunedByS = BigInteger.valueOf(0);
		
		return numTotalRotRed;
	}