You may try
count weapons unitname == 0
as condition. But Binoculars, for example, are counted also as a weapon, so you may use also a !canFire unitname
to be sure the unit cannot fire. It may has weapons, but no ammo, or it may have ammo but no weapons.