Hi

I deleted my original post, since Nebulus posted the solution in the meantime.
A little correction, however
Code:
if(length < 0) { return 0; }
should be modified to
Code:
if(length ==  0) { return 0; }
otherwise "array[length-1]" can access "array[-1]".

Another remark: "int array[]"
Nebulus has chosen this way to define the function arguments.
Another way is to use "int *array". The advantage of these two
compared with "int array[9]" is that arbitrary array-sizes are
allowed.

when i pass our_array[] to a count function i know for a fact you don't have to specify elements
You actually should pass, as Nebulus did, "our_array", rather than "our_array[]".
Or, if you wish, "&(our_array[0])"


Cheers.