if the function is declared for example like
void f( T a[] );
where T is some type specifier then the function deals with a pointer to the type T. That is the above declaration is equivalent to the following declaration
void f( T *a );
and the both declare the same one function.
So the only way to calculate the number of actual elements in the array pointed to by the pointer is to introduce a sentinel value that will differ from values of actual elements of the array.
For example a character array can have such a sentinel value like '\0' that is when a character array contains a string.
An array of strings can have as a sentinel value either an empty string "" or depending on how it is declared (for example as an array of element type char *) the sentinel value can be NULL.
For integer arrays you have yourself to select an appropriate value as a sentinel value. For example if actual elements are non-negative then the sentinel value can be set to -1.