Perform some operation on the traverser and pass the result to the next step.
sideEffect() step is a general filter step.
This step performs some operation on the traverser and passes the result to the next step.
For each person, find the number of people that person knows, and the number of people known by the person and return the results for both counts:
g.V().hasLabel('person'). sideEffect(outE('knows').count().store('knows')). sideEffect(inE('knows').count().store('known by')). cap('knows','known by')