Sure they are divided into small groups of 10 and those 10 send 5 to spy and watch. In the image you see Leonidas boats, 2 boats and considering that the Spartans are very hard, 20 men will not be enough to beat them, worse 5 Waiting at the doors of the cave, must be a decoy, to lure them into the cave and ambush them. There must be 50, maximum 70 men inside the cave.