try this one.It doesnt query the actual table but will provide you the count of rows.This is better way if you have large tables and you need approximate count.

ALTER PROCEDURE dbo.[Counter] 
    @TableName VARCHAR(100) 
AS  
begin

declare @objectid int,@counter int
select @objectid = object_id from sys.all_objects where name = @tablename and schema_id=SCHEMA_ID('dbo')
select @counter = sum(rows) from sys.partitions where object_id= @objectid
and index_id in (0,1)
select @counter
end
go


MS SQL Stored Procedure for counting Dynamic table items
I am playing a Warblade weilding a Spiked Chain.

I have one head of the chain enchanted with +1 Sweeping, and the other head with +2.

My question is, if I have the +2 end as my main attack, and the +1 as offhand, can I still choose to make a Trip attack with the +1 end anytime I choose?
How easy is it to switch the ends of a double weapon?
