SELECT SUM(rows) AS [SQL RowCount] FROM sys.partitions WHERE index_id IN (0, 1) AND object_id = OBJECT_ID('NameOfTable') GROUP BY object_id