To list all databases of a Redis instance (i.e. version 2.2) the following command yields the desired information.
$ redis-cli INFO | grep db
If you're just interested in the amount of currently existing databases (which is limited to 16 per default but can be increased by altering redis.conf) pipe it further to word count.
$ redis-cli INFO | grep db | wc -l
Inside a redis-cli instance you can also issue the
INFO command with the optional
redis> INFO keyspace
In newer versions (i.e. 2.6.2) you can even just call
redis-cli INFO KEYSPACE on the console which gives you also the desired information.