I should note that if you just want to get the number of arguments for a call to a varargs function rather than trust people to terminate the arguments with NULL properly, you can do this with the C99 preprocessor:<p>#define foo(...) foo(PP_NUM_ARGS(__VA_ARGS__), __VA_ARGS__)<p>where PP_NUM_ARGS is a macro to determine the number of arguments; you can find such a macro easily by searching. 
Of course you could just do #define foo(...) foo(__VA_ARGS__, NULL), but this lets you include NULL values in the list.<p>Since the count takes up the first argument to the actual varargs function, you can call it with zero arguments. No type checking, though as mentioned above you might be able to do something interesting about that with _Generic.