Code:
on 500:TEXT:!ylist*:#: {
  var %a = 1 | if ($ulist(*,0) == 0) { msg $chan I have 0 results in my user list. | halt }
  while $ulist(*,%a) { var %namestotal = $addtok(%namestotal,$chr(32) $v1 $+ $chr(32),44) | inc %a }
  if ($ulist(*,0) <= 50) { msg $chan I have %namestotal in my user list. }
  else { msg $chan Sorry $nick $+ , I can only reply to 50 level users. }
}


The code above will ONLY reply to 50 levels. Anything more than 50 will not get the result.

I'm not quite sure what you mean by "if i want it reply only 50 level users."