c_listlengths function

A simple function to compute the lengths of the elements of an R list