Could anyone explain what is wrong with this code?

, ,

https://www.codechef.com/problems/RECSTI

#include <stdio.h>
#include <stdlib.h>

int In (int, int, int *);

int main(void) {
int T;
scanf ("%d", &T);

while (T--) {
    int N;
        scanf ("%d", &N);
    int L[N+1], ans=N, *count= (int*) calloc(N+1, sizeof(int));
    
    for (int i=0; i<N; i++) 
        scanf ("%d", &L[i]);
            
    for (int i=0; i<N; i++) {
        int re=In(i, N, &L);
        if (re>0)  count[i]+=re; 
        else  count[i]=1; 
       
       if (count[i]%2)  ans++; 
    }
    
    if (ans%4!=0)  ans+=2;
    printf("%d\n", ans-N);
    free(count);
}
return 0;

}

int In (int i, int N, int *L) {
int yes=0;
for (int j=0; j<N; j++)
if (L[j]==L[i]) yes++;

return yes;        

}