Here is a slightly modified version of a script by Jackster35-1 from Hawkee. This Script is ideal for use on a Bot and it simply, says how many channels a specific user is in which the bot is present in. Try it out, I found it quite useful in some circumstances.
USEAGE: !count nickhere
on *:TEXT:!count *:#:{
msg $chan NICK: $2 is in $comchan($2,0) of the same channels I am in.
}