title: Counting the number of elements in array
body: <p>I am looking to count the number of entries I have in an array in Twig. This is the code I've tried:</p>
  
  <pre><code>{%for nc in notcount%}
  {{ nc|length }}
  {%endfor%}
  </code></pre>
  
  <p>This however only produces the length of the string of one of the values in the array.</p>
  
  <p><code>{{nc}}</code> will produce an output of all the values of the array (there are 2) but I want the output to be just the number 2 (the count) and not all the information in the array.</p>