parity of given permutation the way I understood inversions is the number of operations ( exchanging positions of two numbers keeping other numbers at same place) to be done to reach a given permutation. To calculate odd or even permutation, I count the number of inversions using a method Which I learnt online mentioned below.
Eg: ${1\ 4\  3\ 2}$ takes $3$ inversions, because $4$ > $3,2$ and $3$ > $2$ so $2+1$ = $3$ inversions. 
But if I keep $1,3$ at same place and exchange $2,4$ i obtain the given permutation. thus it is odd permutation. but the method I learnt online gives different value.
Is this method ( a popular one ) used to determine only odd/even permutation, or actually count the number of inversions?? Is there any method to calculate number of inversions, just by inspection? 
 A: I don't know any smarter way to count inversions in a permutation than simply looking at all pairs of elements to see whether they are inverted or not. In principle, I suppose, there could be. But that doesn't matter, because it would be very unusual to have a good reason to want to know that number for a particular permutation. (The sole exception I can think of is solving homework exercises that check whether you have understood the definition).
Counting inversions is mainly good for theoretical purposes: It's a way to argue that whether a permutation is odd or even is well-defined -- that is, that there is no permutation that can be made both as a product of an odd number of transpositions and an even number of transpositions.
It's not a particularly slick method for finding the parity of a permutation, because there are $\frac{n^2-n}2$ possible inversions to check for an $n$-element permutation, and that number grows uncomfortably fast when $n$ is large.
It is much quicker to find the parity of a permutation by writing it out in disjoint cycle form, and then counting how many cycles of even length there are (an even length cycle is an odd permutation, and vice versa). This can be done in time linear in $n$.
Another quick method (but not quite as suited for pencil-and-paper implementations) is to actually create a sequence of transpositions that reverses the permutation you're looking at, by moving one element at a time into its proper place, exchanging it with what is already there. If you maintain a lookup table of where to find which number along the way, this can be done in linear time too. (Just remember that exchanging an element with itself is not a transposition).
A: The parity is only odd/even. The number of transpositions to reach a permutation may vary, but only so in a even number of steps (resulting in the parity being invariant).
One way to count it is by observing that a permutation is a combination of disjoint cycles. Then you use the fact that the parity of a cycle is odd if it has even length and vice versa. In your case you have three cycles: $(1)$, $(2,4)$ and $(3)$, two even and one odd which makes the parity odd.
