Please double if not triple check that the code you posted actually returns 1 for you:

Code:
//tokenize 32 aaaaaThis is a test! | echo -a $numtok($1-,97)


I do not get 1 for that code.