To count the number of objects in a list, you can use the length function as follows:
List with one element:
list1 <- list (1:20)
length (list1)
[1] 1
Length of the first element of the list:
length (list1[[1]])
[1] 20
List with three elements:
mylist <- list(r1=c(1:10),r2=c(1:5),r3=c(1:2))
> length(mylist)
[1] 3