Count lines with similar tokens

I have 2 files, and I wish to count number of lines with this characteristic:
if any token at line x in file1, is similar to a token at line x in file2.

Here's an example:

file1:
ab, abc
ef
fg

file2:
ab
cd ef
gh

In this case I wish to get 3.
Note that token of file1 are separated by comma "," while file2 tokens are separated with a space " ".

How you will get 3?

Only "ab" at line 1 from file1 is matching with line 1 from file2.
Only "ef" at line 2 from file1 is matching with line 2 from file2.

What you said is absolutely correct. I should get 2, not 3.
My bad

Try

awk -F, 'NR==FNR{for(i=1;i<=NF;i++){A[$i]++}next}
    {for(i=1;i<=NF;i++){if(A[$i]){n++}}}
    END{print n}' file1 FS=" " file2