Code:
ON ^*:JOIN:#: {
  if ($nick != $me) {
    echo $colour(join) -t # $nick has entered # -- $nick(#,0) users -- $address
  }
  haltdef
}
ON ^*:PART:#: {
  if ($nick != $me) {
    echo $colour(part) -t # $nick has left # -- $calc($nick(#,0)-1) users -- $address
  }
  haltdef
}
-t is to enable the timestamp for the event and $address looks after the address for you. $nick(#,0) gives you a user count.