on *:kick:#testt: {
inc %kick.count
}
Your problem was that you used % with inc (it's not a variable).
Anyhow, you can inc a variable even when it's $null, so you don't need anything except the inc line.
Btw, I recommend using a variable such as above, or even more unique. %count could be used by many scripts and using it in yours could cause a conflict. The more unique your variables are, then less chance of having conflicts.