Porównaj kwotę dostawcy z min i max z funkcji okna i uruchom warunkowe zliczanie na zewnętrznym poziomie zapytania:
SELECT vendor_id
, count(min_bid OR NULL) AS min_bid_count
, count(max_bid OR NULL) AS max_bid_count
FROM (
SELECT vendor_id
, amount = min(amount) OVER w AS min_bid
, amount = max(amount) OVER w AS max_bid
FROM rfq_vendor_mapping
WINDOW w AS (PARTITION BY rfq_id)
) sub
GROUP BY 1
ORDER BY 1;