I need to count how many of an element I have, but I'm not having much luck. Element sample:

`<textarea type="text" data-class-changer="question" class="questioninputcss" data-integer-question="866"></textarea>`

Moving on to my code,

I've tried two things. Here's the first, with its response:

```
        var testCountPre = document.getElementByClassName('questioninputcss');
        var testCount = testCountPre.getElementsByTagName('textarea').length;

```

`Uncaught TypeError: undefined is not a function`

---

And the second, with its response:

```
    var testCount = ($(".questioninputcss textarea").length);
    var_dump(testCount);

```

`Number(1) 0`

Edit for clarification: I'm using a var\_dump script that works in javascript.