Fridge Magnets 2

Jaheim is obsessed with keeping shapes together. The refrigerator in his house has magnets of two shapes on the door: green squares and blue circles.

Jaheim wants all squares together and all circles together.

Someone has messed up the magnets.

How many swaps will it take Jaheim to restore order?