[javascript] How can I count the number of elements with same class?