Add getCount method to Record class