Thanks Michael and Andres.
Andres - the idea of the query is just to see whether two nodes (user/user, user/company, company/company) are connected to each other. I was originally using the allShortestPaths algorithm, but kept getting paths that included these "superusers". So I was looking for a way to exclude these superusers from the cypher search. You're right that 10 steps is too far, but even if I was limiting the depth to, say, 6 steps, I'd still like to exclude the superusers.
Michael - thanks for the ideas. I like the idea of setting properties on the powerusers. But can I then filter the paths to exclude these users? In my example, n and m are known nodes, I am looking for a path between them - from which I would like to exclude any powerusers e.g.
path = start_node-[*1..6]-end_node WHERE (not node.poweruser for node in path)