### Question:
DefaultEdgeTraversal extends AbstractEdgeTraversal implements EdgeTraversal { @Override public long count() { return flow.apply(supplier.get()).count().tryNext().orElse(0L); } DefaultEdgeTraversal(Supplier<GraphTraversal<?, ?>> supplier,
                         Function<GraphTraversal<?, ?>, GraphTraversal<Vertex, Edge>> flow,
                         GraphConverter converter); @Override EdgeTraversal has(String propertyKey); @Override EdgeTraversal has(String propertyKey, Object value); @Override EdgeTraversal has(String propertyKey, P<?> predicate); @Override EdgeTraversal has(T accessor, Object value); @Override EdgeTraversal has(T accessor, P<?> predicate); @Override EdgeTraversal hasNot(String propertyKey); @Override EdgeTraversal filter(Predicate<EdgeEntity> predicate); @Override EdgeTraversal limit(long limit); @Override EdgeTraversal range(long start, long end); @Override EdgeRepeatTraversal repeat(); @Override VertexTraversal inV(); @Override VertexTraversal outV(); @Override VertexTraversal bothV(); @Override Optional<EdgeEntity> next(); @Override Optional<EdgeEntity> getSingleResult(); @Override List<EdgeEntity> getResultList(); @Override Stream<EdgeEntity> stream(); @Override Stream<EdgeEntity> next(int limit); @Override ValueMapTraversal valueMap(String... propertyKeys); @Override EdgeTraversalOrder orderBy(String property); @Override long count();  }### Answer:
@Test public void shouldCount() { long count = graphTemplate.getTraversalVertex().outE(READS).count(); assertEquals(3L, count); }
@Test public void shouldReturnZeroWhenCountIsEmpty() { long count = graphTemplate.getTraversalVertex().outE("WRITES").count(); assertEquals(0L, count); }