int qCnt = 0;
int resCnt =0;
for (Node author:graphDB.getAllNodes()){
if (!author.hasProperty("name"))continue;
if (++qCnt>numQueries)break;
Traversal t = new Traversal();
for (Path p:t.description().breadthFirst().relationships(DBRelationshipTypes.WRITTEN_BY).evaluator(Evaluators.atDepth(2)).uniqueness(Uniqueness.NONE).traverse(author)){
Node coAuthor = p.endNode();
resCnt++;
}
}
return resCnt;