ImageDataReader
Reads all remaining rows and then closes IDataReader. This is because the only way to get the total number of records is to read all the rows.
Returns total records count, but only when _reader already read all the records, otherwise returns null.
This is because _reader is a forward-only record viewer and does not contain information about total number of rows.
To calculate total number of records we need to iterate through all the rows and increment _currentRecordNumber