2 ways to achieve this:-
1ST WAY:-select convert(bigint,rows) as Row_Count
from sysindexes
where id = object_id('Test1')
and indid < 2;
2ND WAY:-select sum(row_count) as Row_Count
from sys.dm_db_partition_stats
WHERE object_id = OBJECT_ID('Test1')
AND (index_id in(0,1));