Below is my query
select @monNameStr as [MName], IsNull(count(c.AssignmentID),0), IsNull(sum(s.ACV),0), IsNu
capture @@ROWCOUNT into a variable, because it will change values each time you select it:
DECLARE @Rows int ---your query here SELECT @Rows=@@ROWCOUNT
you can then use it as necessary as @Rows
@Rows