Count Linked List Nodes Leetcode Python