• use Sysobjects

    SELECT COUNT(*) FROM sys.sysobjects

    WHERE xtype = 'p'