Saul sent most of his army home before Jonathan attacked and defeated a Philistine garrison. This attack made the Philistines very angry, and they brought a huge army into Israel and camped at the top of a hill. Most of Saul's army ran away in fear and hid from the Philistines. There are many aspects of this story that give the reader the impression that Israel was unprepared for battle.
Wanting to express the vast number of enemy soldiers, the author uses a hyperbole: "as numerous as the sand on the seashore," meaning "too many to count." (See: [[rc://en/ta/man/jit/figs-hyperbole]])