I realized i didn't answer your question correctly, the correct code should be:

Code:
on *:text:*:#:{
  if ($regex($1-,/word/giS)) {
    inc %count $v1
  }
  elseif ($1 == !count) {
    if ((%floodcounter) || ($($+(%,floodcounter.,$nick),2))) { return }
    set -u30 %floodcounter On
    set -u40 %floodcounter. $+ $nick On
    msg # word has been said %count times
  }
}


twitter @keyeslol