Count Nodes in List

Count the number of nodes in a list.
ListNode API methods: node.next().

public Integer count(ListNode node) {
}