What function can be used to count the number of rows in a MySQL result set in PHP?

To count the number of rows in a MySQL result set in PHP, you can use the `mysqli_num_rows()` function. This function returns the number of rows in the result set of a SELECT query. You can simply pass the result set as a parameter to `mysqli_num_rows()` to get the count of rows.

// Assuming $result is the MySQL result set
$row_count = mysqli_num_rows($result);
echo "Number of rows: " . $row_count;