pass return number of elements in array method