$nick($chan,0) will return the total number of users.
You can also break it down by users of each class (op, voice, etc). Try this one out.
$+(@,$nick($chan,0,o),+,$nick($chan,0,v,o),/,$nick($chan,0))
That'll show something like @4+13/76, which is @(ops) +(voices) /(total)
/help $nick for more info.