単一のクエリでデータと合計が必要です。
SELECT id, order_name, order_ownurl, order_category, order_id
FROM `order_details`
WHERE ordered_name='nikon d3200'
ORDER BY ordered_price asc
と
SELECT count(distinct order_id)
FROM `order_details`
WHERE ordered_name='nikon d3200'