Could be a select into InformationSchema (all namespaces have informationschema tables right?) table? Like:

SELECT count(*) FROM INFORMATION_SCHEMA.SCHEMATA