First of all the number of inversions isn't defined as the minimum number of switches we can do to arrange a permutation. As explicitly stated in the give link: "Given a permutation $a_1, a_2, a_3,...$, an of the $n$ integers $1, 2, 3, ..., n$, an inversion is a pair $(a_i, a_j)$ where $i < j$ and $a_i > a_j$".
Another way to look on inversions is as swapping two adjacent elements, s.t $(a_i, a_{i+1})$ where $a_i > a_{i+1}$. So the number of inversions in a sequence is given by the number of such defined swaps you need to perform in order to sort the sequence. Additionally this type of swapping is called Bubble Sort