DocumentationMathematicaThe Mathematica BookMathematica Reference GuideListing of C Functions in the MathLink Library
MLGetArgCount()
int MLGetArgCount(MLINK link, long *n) finds the number of arguments to a function on link and stores the result in n.
See Section 2.13.12.