1 2 3 4 5 6 7 8
private ["_held","_sideID"]; _held = 0; _sideID = _this Call GetSideID; {if ((_x getVariable 'sideID') == _sideID) then {_held = _held + 1}} forEach towns; _held