SyntaxFix
Write A Post
Hire A Developer
Questions
This will get you the row count, but will leave the data reader at the end.
dataReader.Cast<object>().Count();