fixed DB::num_rows(); function