public int count(T[] a)
	{
		// Allocate space just once. Non-static aux[] used
		@SuppressWarnings("unchecked")
		T[] aux = (T[]) new Comparable[a.length]; 

		int bInversions = brute(a);
		int inversions = count(a, aux, 0, a.length - 1);

		assert bInversions == inversions;

		return inversions;
	}