#include <iostream>

template < std::size_t NUM_ELEMENTS > void mergeSort( int (&A)[NUM_ELEMENTS] )
{
    //* here I want to find number of elements in the array A
    std::cout << "number of elements in the array A is: " << NUM_ELEMENTS << '\n' ;
    
    // ...
    
}

int main()
{
    int A[]={10,5,3,37,13,9,24,7,39,19};
    mergeSort(A);
}