MongoDB: implemented function count_tables()