The sys.sysobjects system view contains one row for each object in the database, making it ideal for counting objects. While sys.objects is preferred in modern SQL Server versions, sys.sysobjects is also available. The other options are either invalid procedures or incorrect dynamic management views.