看起来你在比赛中有点过分,我们可以简化这一点.
MATCH (u:User {lastName:"Example"})-[:PINNED]->(z:Pin) RETURN z, SIZE( ()-[:LIKES]->(z) ) as likes