How to get all unused content_types in a space?

Is there a way to get all orphan content_types in one space?
Problem: I have multiple spaces and some of them are hitting content_type limits. Before I think about the upgrade, I would like to check if all content types are really used in a space. It might be that the content for the market has been created only using half of the content types, as there are markets that are way bigger than the others and using more different content types.
I can list all content types, but would like to get just the ones without any content

Thanks in advance!