title: sas how to count items in a list
body: <p>I would like to count the number of integers in my variable, the same way that %countw counts the number of words in a variable.</p>
  
  <p>Example:</p>
  
  <pre><code>%let  test = 'aaa' 'bbb';
  %let ntest = %sysfunc(countw(&amp;test.));
  </code></pre>
  
  <p>ntest = 2..
  My question is how to do this for integers?</p>
  
  <p>Now I have:</p>
  
  <pre><code>%let test2 = 12, 13, 14;
  </code></pre>
  
  <p>How to get ntest = 3?
  How can I get the number of items in &amp;test2.?</p>
  
  <p>I apologize if this is ridiculously simple and I just missed the documentation.</p>