tokenize() returns an array of tokens, so
PHP Code:
temp.tokens = temp.str.tokenize(",");
temp.count = temp.tokens.size();
will give you the number of tokens.
You can use
tokenize(delim) on any string where
delim specifies the delimiter (or what you want to use to separate the string).