Let's create an empty list (not required, but good to know):
> mylist <- vector(mode="list")
Let's put some stuff in it - 3 components/indexes/tags (whatever you want to call it) each with differing amounts of elements:
> mylist <- list(record1=c(1:10),record2=c(1:5),record3=c(1:2))
If you are interested in just the number of components in a list use:
> length(mylist)
[1] 3
If you are interested in the length of elements in a specific component of a list use: (both reference the same component here)
length(mylist[[1]])
[1] 10
length(mylist[["record1"]]
[1] 10
If you are interested in the length of all elements in all components of the list use:
> sum(sapply(mylist,length))
[1] 17