public static int getElementCount(Compoundable compound, Element e)
	{
		int count = 0;
		//System.out.println(compound);
		
		if(compound instanceof Atom && ((Atom)compound).getElement().equals(e))
		{
			count = 1;
		}
		else if(compound instanceof Compound)
		{
			Compoundable[] temp = compound.getElements();
			for(int k = 0; k < temp.length; k++)
			{
				if(temp[k] instanceof Compound)
				{
					Set<Element> uniques = getUniqueElements(temp[k]);
					if(uniques.contains(e))
					{
						count += (compound.getSubscripts())[k] * getElementCount(temp[k], e);
					}
				}
				else if(temp[k] instanceof Atom && e.equals(((Atom)temp[k]).getElement()))
				{
					count += (compound.getSubscripts())[k];
				}
			}
		}
		return count;
	}