We are running C, so there is no way to actually count elements in array within function. The size should be transferred as a separate parameter.