If listScore is a NumPy array, you can do -
count = np.all(listScore == np.array([2,0]),axis=1).sum()
If the array is always an array of two columns, you can compare the two columns separately with 2 and 0 respectively, for performance and get the count value like this:
count = ((listScore[:,0] ==2) & (listScore[:,1] ==0)).sum()
If you are a fan of np.einsum you might like to try this twisted -
count = (~np.einsum('ij->i',listScore != [2,0])).sum()
Another performance-oriented solution might be cdist from scipy -
from scipy.spatial.distance import cdist count = (cdist(listScore,np.atleast_2d([2,0]))==0).sum()
source share