Count the number of elements in an Array