title: Macro returning the number of arguments it is given in C?
body: <p>Is it possible to write a C macro that returns the number of its arguments?</p>
  
  <p>I want something that does:</p>
  
  <pre><code>foo(1) -&gt; 1
  foo(cat, dog) -&gt; 2
  foo(red, green, blue) -&gt; 3
  </code></pre>
  
  <p>Even better if this macro can be defined in such a way that it works with ## so that</p>
  
  <pre><code>foo(1) -&gt; bar1(1)
  foo(cat, dog) -&gt; bar2(cat, dog)
  foo(red, green, blue) -&gt; car3(red, green, blue)
  </code></pre>
  
  <p>Thanks!</p>
  
  <p>EDIT: I really want a macro, not a function. Suggestions to use functions will be downvoted.</p>