this is not realy true. you get the number of elements of an array by setting the array in scalar context. $#array gives you the the position of the last array element, which is mostly not the same.
to get the size of a nested array, you have to understand references and how perl handles lists of lists. for the lazy, here is an example.
for those who want to know whats going on, start by reading perlreftut, perldsc and perllol.