Added argument count to error reporting of function.