Count Number Of Inversions in an array.