  We consider a bivariate polynomial that generalizes both the length and
reflection length generating functions in a finite Coxeter group. In seeking a
combinatorial description of the coefficients, we are led to the study of a new
Mahonian statistic, which we call the sorting index. The sorting index of a
permutation and its type B and type D analogues have natural combinatorial
descriptions which we describe in detail.
