Essentially, I want to design a function that takes lists of lists of lists of... where eventually the farthest nested lists will have a vector as a single element, and each list it is nested in will have a vector as its last element.

What I want the function to do is to look at each of the bottom most level nested elements and count how many there are.

For example: Say A is a list of 16 vectors, B is a list of 10 vectors, C is a list of 12 vectors, and D is a list of 8 vectors. X is the list that contains A, B and a vector, and Y is the list that contains C, D and a vector. Z is the list of X,Y and a vector.

The function would take Z, and give an output of 46 (16 + 10 + 12 + 8).

Here's the code i'm using right now:

```
listreader <- function(listoflists)
{
  nlist = listoflists
  ini = 0
  its = 0
  if(length(nlist) > 1)
  {
    for (i in 1:(length(nlist)))
    {
      listreader(nlist[[i]])
    } 
  }
  else
  {
    ini = ini+1
  }
  return(ini)
}

```