It'd be helpful if you mentioned if you're using an SQLDataSource or an ObjectDataSource for your grid view
Handle the selected event. The ObjectDataSourceStatusEventArgs 's member 'ReturnType' will have your data source from which you can get the count
int RecordsCount = ((DataSet)e.ReturnValue).Tables.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