The length of a walk is the number of edges it has, counting repeated edges as many times as they appear.