Contact List filter for Number of associated companies

I was trying to do this in a report. The reporting engine can filter by “Number of Associated Contact”. I also want to filter deals by “Nubmer of Associated Companies”.