added utility function for $rs->num_rows