I don't think "enemy" is a command as such, it is the side of a renegade unit. (One that has killed too many friendlies and is therefore enemy to all units.) In other words it is a value returned by other commands. I suspect "friendly" is similar, but opposite obviously. Perhaps that can be achieved with setCaptive true, dunno.
sideEnemy and sideFriendly are not listed in the online comref. However,
countEnemy
countFriendly
countSide
do exist.