• I prefer using sp_spaceused to find table counts quickly. If you use OBJECT_DEFINITION() to find the body of sp_spaceused, you will see how they are determining the table count. Tying that up to all user tables, I get a fairly simple query below for my results:

    select object_name(p.object_id),

    SUM(case when (index_id < 2) then row_count else 0 end)

    from sys.dm_db_partition_stats p inner join sys.tables t on p.object_id = t.object_id

    where t.type = 'U'

    group by p.object_id

    order by object_name(p.object_id)