Implement len() and subscript.