Help me in solving STRNG problem

My issue

not able to get what is wrong in my code

My code

# cook your dish here
import math
from functools import reduce

def check(A):
 gcd=reduce(math.gcd,A)
 count=0
 for j in range(len(A)):
   if gcd==1:
     print("0")
     return
   else:
     if A[j]%gcd==0:
      #  print("Here")
       count+=1
 print (count)    
 return

t = int(input())
for i in range(t):
 N=input()
 A=list(map(int,input().split()))
 check(A)

Learning course: Number theory
Problem Link: Practice Problem in - CodeChef

@shreetej07
for test case
1
6
5 2 2 6 2 2
your output is 0
but the correct output will be 1