if you take a look in the comref you'll see
units,
group and
player are all commands, or rather they're built-in references to things.
units grpOperand types:
grp: Group
Type of returned value:
Array
Description:
Arrays of all units in the group.
group objOperand types:
obj: Object
Type of returned value:
Group
Description:
Group in which given unit is assigned.
player Type of returned value:
Object
Description:
person controlled by player.
so,
((count(units group player))<2) is pretty self-explanatory, although the '
player' part of that line could be the name of any unit leading a group.
similarly,
[ player ] join (group newgroupleader) means the player unit will join the group led by
newgroupleader, who again could be any unit leading a group.
hope that clears things up