Removed passing by reference to get record count.