In a smallish database I try to add to a node a degree property (how many relationships go out from this node).
I tried the following query:
MATCH (p)-[r]->(x) WHERE p.id = "42"
SET p.degree = count(r);
The WHERE clause WHERE p.id = "42" full defines my node, but there seems to be something wrong with the SET clause SET p.degree = count(r), because I get an " Invalid use of aggregating function count(...) in this context " error.
I don't think there is that much difference in speed between the two queries.
The advantage of Apoc function is mainly the flexibility, because can be used everywhere (for example in the SET, as in this case) and you can customize the count, filtering it using a relationship pattern. See here for more details.