The 'quick' way to count the rows in a table is to look up the index stats. However, I imagine that's probably a 'extra credit' type answer :) It doesn't evaluate the rows in table so when you have multi million (or billion) row structures it's a life saver.
Something like this:
SELECT
[Table_name] = OBJECT_NAME(so.[object_Id])
, [Rows] = SUM ([row_count])
FROM
sys.dm_db_partition_stats AS ss
JOIN sys.objects AS so ON so.[object_id] = ss.[object_id]
WHERE
so.[type] = 'U'
AND so.[is_ms_shipped] = 0
AND [index_id] IN (0, 1)
GROUP BY
OBJECT_NAME(so.[object_id])
Transact Charlie
Msg 3903.. The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION.
http://nosqlsolution.blogspot.co.uk/