import sys

def linierSearch(x,data):
    for i in range(0,len(data)):
        if data[i] == x:
            return 1
    return 0

l = []
for i in sys.stdin:
    l.append(i)

l[1] = l[1].split()
l[3] = l[3].split()

count = 0
for i in range(0,len(l[3])):
    count += linierSearch(l[3][i],l[1])

print(count) import sys sys def linierSearch(x,data):
    for i in range(0,len(data)):
        if data[i] == x:
            return 1
    return 0 linierSearch for i in range(0,len(data)):
        if data[i] == x:
            return 1
     i range(0,len(data)) range 0 len(data) len data if data[i] == x:
            return 1
     data[i] == x data[i] data i x return 1 1 return 0 0 x x data data l = [] l [] for i in sys.stdin:
    l.append(i) i sys.stdin sys stdin l.append(i) l.append l append i l[1] = l[1].split() l[1] l 1 l[1].split() [1].split [1] l 1 split l[3] = l[3].split() l[3] l 3 l[3].split() [3].split [3] l 3 split count = 0 count 0 for i in range(0,len(l[3])):
    count += linierSearch(l[3][i],l[1]) i range(0,len(l[3])) range 0 len(l[3]) len l[3] l 3 count += linierSearch(l[3][i],l[1]) count linierSearch(l[3][i],l[1]) linierSearch l[3][i] [3] l 3 i l[1] l 1 print(count) print count l = [] [] l count = 0 0 count count += linierSearch(l[3][i],l[1]) linierSearch(l[3][i],l[1]) count def linierSearch(x,data):
    for i in range(0,len(data)):
        if data[i] == x:
            return 1
    return 0 def linierSearch(x,data):
    for i in range(0,len(data)):
        if data[i] == x:
            return 1
    return 0 linierSearch
import sys

def linierSearch(x,data):
    for i in range(0,len(data)):
        if data[i] == x:
            return 1
    return 0

l = []
for i in sys.stdin:
    l.append(i)

l[1] = l[1].split()
l[3] = l[3].split()

count = 0
for i in range(0,len(l[3])):
    count += linierSearch(l[3][i],l[1])

print(count)
