Replaced call to getDataSetMetadata().getNumberOfRows()with getRowCountNonTrimmed()