No need for the if statements, just /inc away... Also -- your code would count each user that you kick twice and users other ppl kick once.

Also -- what is this mode -k? Using -k on a channel sets a key. I think you are referring to using /ban -k. In that case, you have two options:

1. rewrite your alias to inc a counter when you do a /ban
2. use the on kick event

Code:
on *:KICK:#: {
  [color:green]; if you wanna count all kicks and not just your own, remove this line[/color]
  if ($nick != $me) halt
  [color:green]; increment the counter (channel specific!)[/color]
  inc %kickcount. [ $+ [ $chan ] ]
  [color:green]; harass the user[/color]
  [color:green]; remove the blue word if you removed the other line[/color]
  .notice $knick You are person number %kickcount. [ $+ [ $chan ] ] I have [color:blue]seen[/color] kicked from $chan !
}


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius