Javascript Count Array Length