make getRecordcount a member function