Code from previous insertion sort
Solved by adding to a counter when swap