Do you have a table listing departments for each company?
Assuming there are always 4 depts for each company as in your example:
SELECT counts.company_no, counts.dept_no, counts.count
FROM (
SELECT dept_no = 1
UNION SELECT dept_no = 2
UNION SELECT dept_no = 3
UNION SELECT dept_no = 4
) depts
left join counts on (counts.dept_no = depts.dept_no)
ORDER BY company_no, dept_no