well, i made the routine like this
on *:part:#mychannel: {
Set %personen $nick(#,0)
/updatenl
if (%personen < 2) { doesomething }
}
Look at where I put the updatenl command

on *:part:#mychannel:{
[color:blue] updatenl[/color]
Set %personen $nick(#,0)
if (%personen < 2) { doesomething }
}
The idea is to update the nicklist BEFORE you set the variable.