[arrays] Count length of array and return 1 if it only contains one element