how can I know the number of tokens in a bash variable (whitespace-separated tokens) - or at least, wether it is one or there are more.
Simple method:
$ VAR="a b c d" $ set $VAR $ echo $# 4