I tried this in a trigger condition:
("alive _x" count units thenameofyourgroup) <= n
But it only works if you don't kill the original leader of the group. Once the leader of the group is killed, he is unassigned fromt he group, and the count goes to zero.
So I wrote and tested this script. It works.
; count_members.sqs
; By: JohnnyBoy
; To call, put this line in leader unit's init:
; [this,5] exec "count_members.sqs"
_grp = units (_this select 0)
_reduced_count = _this select 1
TitleText ["in count_members.sqs","Plain Down"]
#loop
; count the members in the group that meet the "alive" condition
? ("alive _x" count _grp) <= 5 : goto "do_something"
; wait 2 seconds, and try again
~2
goto "loop"
#do_something
; put whatever code here you want to happen when squad size reduced below desired number
hint format ["Alive member count now =%1","alive _x" count _grp]
exit
Since you capture entire array of units before anyone is killed, it doesn't matter when leader gets killed. Hope this helps you.