Added counter for edges.