How can i (inside a function) read how many parameters were passed to it....
(if your saying thats easy you should know when writing the functions i suggest you look into --> va_arg, va_end, va_start <-- inside <stdarg.h>)
You can't. When you design your function you should design in a method for it to receive this information from the caller. Note that va_arg, va_end, va_start require at least 1 permanent parameter to work and this is often used to give that indication.
Take printf as an example of a function with a variable number of arguments that uses va_arg, va_end, va_start. It knows how many arguments are in the function call because the user tells it via the information passed in the format string (i.e. for each % field there is 1 or sometimes 2 arguments).
Your function would have to do the same, that is find a way to receive the number of arguments passed to it via the other function parameters.