add basic length of a linked list that may contain a cycle