@luke Here is how you can calculate number of nodes. For a schema say
type Person {
name
age
friend
owns_pet
}
Then the query to get the number of Person Nodes with name would be.
{
nodeCount(func: has(<name>)) {
nodeCount: count(uid)
}
}