The sum of oxidation number of all elements in an ion is equal to charge on ion.
In the reaction MnO4−changes into Mn2+
Let oxidation state of Mn in MnO4−=x ∴x+(4x−2)=−1 ∴x=+7
Oxidation state of Mn in Mn2+=+2 ∴ the oxidation number of Mn changes from +7 to +2 during reaction.