Alright, with various possibly conflicting things being said people have probably confused you, and you're over thinking things. This is about what you need I believe:
Other than the ... bits, I've left one other little math problem with it for you to correct. See what values you get from that for an already sorted and a reverse sorted array.
template <class iterator>
int sortPercentage(iterator start, iterator finish)
int outOfOrder = 0;
int numPairs = ...; // Simple subtraction equation here
if (... > ...)
return 100 * outOfOrder / numPairs;