Refactor LinkedList.size() by reducing the number of lines and return statements to make it more pythonic.