The length of a cycle is the number of edges in it.