Adds list length function. However, the test fails to compile because of a type mismatch that I cant figure out