The Kendall tau distance between two permutation is the number of index pairs, for which the two permuations disagree in their order: $$K(\alpha, \beta) := |\{(i, j): i < j.\quad [\alpha(i) < \alpha(j) \wedge \beta(i) > \beta(j)] \vee [\alpha(i) > \alpha(j) \wedge \beta(i) < \beta(j)]\}|$$
For computing the Kendall tau distance, Wikipedia mentions the following technique:
Given two rankings $\tau_1, \tau_2$, it is possible to rename the items such that $\tau_1 = (1, 2, 3, \dots)$. Then, the problem of computing the Kendall tau distance reduces to computing the number of inversions in $\tau_2$.
Now let $\alpha = (4, 2, 1, 3)$ and $\beta = (4, 3, 1, 2)$. According to the above definition, $K(\alpha, \beta) = 1$ since only the index pair $(2, 4)$ is a disagreement. However when we use the above technique, we would translate $\beta$ into $(1, 4, 3, 2)$, for which the inversion count is 3. The new $\beta$ is translated using the following mapping, which maps $\alpha$ to the identity permutaion: $4 \to 1, 2\to2, 1\to3, 3\to4$
Now I wonder whether I or the Wikipedia article is wrong? In the latter case, is there still some way to compute the Kendall tau distance in $\mathcal{O}(n \log(n))$ time, i.e. can we still calculate the Kendall tau distance based on inversion counts?