IMDb interview question

Count How Many Swaps in an array