Try something like this:
$query = "SELECT C.Company, Count(B.*) AS Numbids FROM Companies AS C LEFT JOIN Bids AS C ON C.ID = B.CompanyID GROUP BY C.ID ORDER BY Company ASC, B.Numbids DESC";
didn't test it. should be about right, but might contain some errors. Do replace the fields with your field and table names