Refactor result set processing.
Add rowCount() method.