It'd be helpful if you mentioned if you're using an SQLDataSource or an ObjectDataSource for your grid view
If ObjectDataSource,
Handle the selected event. The ObjectDataSourceStatusEventArgs 's member 'ReturnType' will have your data source from which you can get the count
Eg:
int RecordsCount = ((DataSet)e.ReturnValue).Tables[0].Rows.Count;
Or the ReturnValue could even be a DataView. It's better you check.
If using an SqlDataSource,
Handle the selected Event
The SqlDataSourceStatusEventArgs's member 'AffectedRows' will have the count
Eg:
SqlDataSource1_Selected(Object sender,
System.Web.UI.WebControls.SqlDataSourceStatusEventArgs e)
{
e.AffectedRows
...