Due to their social nature gerbils need the company of their own kind, the exception being Fat-Tailed gerbils. It is always advisable to get a pair of gerbils, and you can keep either two males or two females. Whilst they are social and can live in groups, unless you have a very big area to keep them in it's better to keep no more than 2-4. Large groups can become unstable and aggression can break out. Most fights are due to dominance and problems are more likely if you keep females in larger groups.
You should try to buy gerbils that are already in pairs because it can be difficult to introduce two gerbils to each other when they are adults (around 16 weeks old). Although gerbils are social animals, they are very territorial and will fight other gerbils who are strangers to them.
It is possible to introduce gerbils that are around eight weeks old. At this age, gerbils will mix happily with one another and will settle down with any new gerbils that are introduced to them. But once adult, special care is needed when introducing gerbils together and although not impossible, males for example can usually be paired up with a baby, it requires some care. For this reason it is best to get your pair of gerbils from the same place at the same time.