A farmer wants to put a fence around a garden in the shape of a square. The fence posts are placed every 2 meters. One side of the garden is 10m long. How many posts does the farmer need?