Fixed all the queries to reflect the new relationships.

Now counting concepts and resources in the object labels and generating the correct results for all endpoints.