{"name":"countSide","operator":null,"title":"countSide","type":"command","url":"https://community.bistudio.com/wiki/countSide","revid":378522,"updated":"2026-05-04T01:53:42Z","groups":["Sides","Object Detection"],"status":"ok","replaced_by":[],"games":[{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},{"game":"ofpe","name":"Operation Flashpoint: Elite","version":"1.00"},{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"ofp","name":"Operation Flashpoint","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Returns how many units in the given array belong to given side.","syntaxes":[{"syntax":"side countSide array","since":null,"effect":null,"exec":null,"params":[{"name":"side","type":"Side","optional":false,"default":null,"description":null,"types":["Side"],"since":null,"text":"side: Side"},{"name":"array","type":"Array of Objects or Groups","optional":false,"default":null,"description":"Array of Objects or Groups\n\n> [!NOTE]\n> If the object in passed array is a Group, the leader of the group will be counted.","types":["Array","Object","Group"],"since":null,"text":"array: Array of Objects or Groups\n\n> [!NOTE]\n> If the object in passed array is a Group, the leader of the group will be counted."}],"returns":{"type":"Number","types":["Number"],"description":null,"text":"Number"},"form":"binary","operator":null,"left":{"text":"side","types":["Side"]},"right":{"text":"array","types":["Array","Object","Group"]}}],"examples":[{"text":"```sqf\n_num = west countSide list _triggerOne;\n```","code":["_num = west countSide list _triggerOne;"]},{"text":"```sqf\n_numCivPlayable = civilian countSide playableUnits;\n```","code":["_numCivPlayable = civilian countSide playableUnits;"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["countFriendly","countEnemy","countUnknown","count","countType","playersNumber","units","allUnits"],"notes":[],"categories":["ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Detection","Command Group: Sides","Introduced with Operation Flashpoint version 1.00","Operation Flashpoint: Elite: Scripting Commands","Operation Flashpoint: New Scripting Commands","Operation Flashpoint: Scripting Commands","Scripting Commands","Take On Helicopters: Scripting Commands"]}