How is it possible to know the number of rows returned in the result set?

The function mysqli_num_rows() returns the number of rows in a result set.