Help me in solving chef and doll problem

My issue

my code runs fine but when i submit it , the answer doesn’t get accepted . can somebody explain why its not accepted

My code

#include <iostream>
using namespace std;

int main() {
 int t;
 cin>>t;
 while(t--)
 {
     int n;
       int count=0;
     cin>>n;
     while(n--)
     { int i;
      cin>>i;
      if(i!=2)
     {
    
     count++;
        
     }
      
         
     }
     cout<<count<<endl;
 }
	return 0;
}

Problem Link: MISSP Problem - CodeChef

@dazeddivya
Its because your logic is not right .
The logic is u have to count the freq of each doll then , print the doll with odd freq.