I am sure this is not what you are looking for,
Select * , Row_number() OVER (order by C),
(Select count(*) FRom T)
from T
post the query in this format and you would get lot better replies,
http://www.sqlservercentral.com/articles/Best+Practices/61537/
---------------------------------------------------------------------------------