Length

Given a [!scala]List[Int][/!][!java|python]recursive list[/!], return its length[!scala] (without using its size method, of course)[/!].

Your solution should be linear in time.