It looks like the last Count()
is returning the number of elements returned by .Return(n => n.Count()
, which will always be 1 element (a single number).
Try removing .Count()
from the end (and replacing it with Single()
):
query = client.Cypher
.Match("(n { Name: 'a'})")
.Return(n => n.Count())
.Results
.Single();