create 20 BLUFOR. create trigger END1 with condition "west countSide thislist <= 10". Attack their position until there are only 10 left, the mission will then end.
Run the same scenareo with "END1" call BIS_fnc_endMission; in the init file. The trigger will happen automatically and the mission will end whilst there are still 20 BLUFOR left.