WPDB NUM_ROWS
global $wpdb;
$wpdb->get_results("
SELECT * FROM " . $wpdb->prefix . "product_order
WHERE
rel = '" . $post["id"] . "' AND
`range` = '" . $range . "' AND
category = '" . $range . "'
");
echo $wpdb->num_rows;
Thoughtful Tapir