This is one of those classic “It depends answers”. First, never keep 2 males of any type of gecko together as they will certainly fight. Also, separate subadult males from females until they are adults, This avoids the male from breeding with a female not large enough to breed (at least 52 grams). Finally, do not keep geckos of significant size difference together. The smaller will most likely either be bullied and not grow like it should or become lunch.
Always try to provide more floor space than height in your enclosure as leopard geckos are terrestrial (ground dwelling). A 20L is MUCH better than a 20H.
Baby leopard geckos can be kept together without an issue. We keep the two from the same hatch (2 eggs laid at the same time) together. Consider keeping up to 4 per 10 gallons of enclosure until they are juveniles.
Juveniles (2-4 months of age) will take a bit more space and should be limited to 3/10 gallons of space.
As sub-adults (5-10 months of age), not only should you be checking for males, but should give the animals more space- only 2 per 10 gallons.
Finally, as adults, one animal per 10 gallons is acceptable. If you are considering a 20 long aquarium (perfect size), with enough hiding spaces, you may keep up to a male and two females.