int resultCount = 0;
for (Resource object : graph.getObjects(resource, resource2)) {
if (graph.isInstanceOf(object, resource3)) {
int resultCount = 0;
for (Resource object : graph.getObjects(resource, resource2)) {
if (graph.isInstanceOf(object, resource3)) {