public int getNumberOfInstances(Class c) {
		if (layerBasket.isEmpty())
			return 0;
		int n = 0;
		synchronized (layerBasket) {
			for (Layered l : layerBasket) {
				if (c.isInstance(l))
					n++;
			}
		}
		return n;
	}