The channel i need to count from is the one it joins $3 so is it just

($nick($chan,$3) < 5) then?