private int getNumberOfObjects(byte type) {
		int n = 0;
		switch (type) {
		case BY_ATOM:
		case BY_ELEMENT:
			n = model.getAtomCount();
			break;
		case BY_RBOND:
			n = model.getRBondCount();
			break;
		case BY_ABOND:
			n = model.getABondCount();
			break;
		case BY_TBOND:
			n = model.getTBondCount();
			break;
		case BY_MOLECULE:
			n = model.getMoleculeCount();
			break;
		}
		return n;
	}