Something like this should suffice. I'm not sure what the "D" object type is on sysobjects :-(
set nocount on
select case type
when 'D' then 'Whats This?'
when 'P' then 'Stored Procs'
when 'R' then 'Rules'
when 'S' then 'System Tables'
when 'TR' then 'Triggers'
when 'U' then 'Tables'
when 'V' then 'Views'
else 'Other'
end, count(*)
from sysobjects
group by type
select 'Indexes', count(*)
from sysindexes
select 'Constraints', count(*)
from sysconstraints
Greg.