I suggest you to think in terms of units, not single soldiers.
Think about goblins and PCs militia as single units. Depending on how big you think, you may think units as composed by 10/50/100 soldiers.
Miniature's Handbook and a few other manuals have rules for this, but I suggest you to make it simple. Give them AC and to-hit as PCs and any 10/50/100 you have a new unit.
Or you can do it quicker: any simple unit has, to say, a flat 10 as combat value and any unit give another +10. Then add customized bonus in (better equipment, spellcaster in the army, better described tactics, use of fortification, use of siege weapons... the only limit, your fantasy) and confront results. Less than 10 difference between the two armies is an equilibrate battle: roll dice/dices and the winner wins. Between 10 and a quarter of the higher is a small edge: roll dices as before, but the higher rank army has more possibility to win. Between a quarter and a half, edge: roll dices, but the victory of the underdog should be very unlikely and there should be a small chance of tota annihilation. Up one half to the double: the best chance of the underdog is to reach draw. More than the double: it varies from the overcome of the underdog to the annihilation of the underdog (or, if you like speed, don't ever bother to roll dices).
You've got the idea