With FileMaker 12 and 13, ExecuteSQL with the DISTINCT key word can provide you with this count.
With the list function, (as will be needed with older versions or those that don't choose to try SQL), if you have this set of relationships:
You can use:
ValueCount ( Vendors::Vendor ID )
and you'll get a count of each vendor without any duplicates.