Query below returns total number of tables in 'Sales' database.
Query
SELECT  COUNT(*) AS Tables
FROM    DBC.TablesV
WHERE   TableKind = 'T'
AND     DatabaseName = 'Sales';
Columns
- Tables - number of tables in a database
Rows
Query returns just one row.
Sample results
Those results show that there are 16 tables in the 'Sales' database.

 
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                     
                                                                 
                                                             
                                                             
                                                             
                                                             
                                                                 
                                                             
                                                             
                                                                 
                                                             
                                                             
                                                             
                                                             Przemek Samojlo
                                                                        Przemek Samojlo
                                 Teradata
                                                                Teradata
                                 SQL Server
                                                                                                SQL Server
                                             Azure SQL Database
                                                                                                Azure SQL Database
                                             Oracle database
                                                                                                Oracle database
                                             Snowflake
                                                                                                Snowflake
                                             Amazon Redshift
                                                                                                Amazon Redshift
                                             IBM Db2
                                                                                                IBM Db2
                                             Vertica
                                                                                                Vertica
                                             PostgreSQL
                                                                                                PostgreSQL
                                             MySQL
                                                                                                MySQL
                                             MariaDB
                                                                                                MariaDB
                                             Microsoft Access
                                                                                                Microsoft Access