Let's find out how we can count the elements in array and use this information in smart ways.