# Counting spesific nodes

**URL:** <https://forum.kirupa.com/t/counting-spesific-nodes/192301>\
**Category:** programming\
**Created:** [June 27, 2006, 5:25pm UTC](https://forum.kirupa.com/t/counting-spesific-nodes/192301 "2006-06-27T17:25:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![saevik](https://avatars.discourse-cdn.com/v4/letter/s/e495f1/32.png) [@saevik](https://forum.kirupa.com/u/saevik)\
**Post date:** [June 27, 2006, 5:25pm UTC](https://forum.kirupa.com/t/counting-spesific-nodes/192301/1 "2006-06-27T17:25:19Z")

</div>

Hi,

Let’s say I have a XML file with three types of nodes (or childnodes); type1, type2 and type3. Many of each.  
How do I use .length to count the number of nodes named type1?

Thanks :cons:
