The thing that gets passed to your function is not actually an array, but a pointer. Since a pointer is a single integer, the result of the division is 1.
By the way, what's the point of your ARRAY_SIZE macro? What does that achieve?
That could happen because inside the function it isn't known which size the array has. The size on an array is only known within the translation unit where it is defined. Consider: If an array will be passed into a function, this function will never know how large the array is. Internally, passing an array will be handled as a pointer.
Btw: Why do you define your function inside a header? The definition should be seperated to an ordinary source file.
Yes, I can see what the macro is doing. It's not exactly rocket science.
I was asking why you bothered to put it in a macro. What do you achieve by doing that?
Is there a way to let the function know the arrays size?
The same way as you'd let a function know any other information: by passing it in as an argument.
That's the typical pattern for passing C-style arrays into a function: pass the pointer, and pass the size as a separate argument.
And, since no-one else has said it yet: I'd advise you to move away from using C-style arrays, and learn how to use STL containers, and in particular, std::vector.