It depends on how much filtration is on the tank and how often you plan on doing water changes.
If you monitor the water quality and do a partial water change twice a week, and have a well established filter on the tank, then you could have 8-10 pygmy cories in there. However, if you miss a water change or the filter packs up they could be in trouble. A bigger tank would be a bit safer in the long run.