def LinearSearch(A,n,key):
    i = 0
    A[n] = key
    while A[i] != key:
        i += 1
    return i != n

N = int(input())
S = [int(x) for x in input().split(" ")]
S.append(None)


q = int(input())
T = [int(x) for x in input().split(" ")]

count = 0

for key in T:
    if LinearSearch(S,N,key):
        count += 1
print(count) def LinearSearch(A,n,key):
    i = 0
    A[n] = key
    while A[i] != key:
        i += 1
    return i != n LinearSearch i = 0 i 0 A[n] = key A[n] A n key while A[i] != key:
        i += 1
     A[i] != key A[i] A i key i += 1 i 1 return i != n i != n i n A A n n key key N = int(input()) N int(input()) int input() input int(x) for x in input().split(" ") for x in input().split(" ") x input().split(" ") ().split () input split " " for x in input().split(" ") int(x) int x S = [int(x) for x in input().split(" ")] S [int(x) for x in input().split(" ")] S.append(None) S.append S append None q = int(input()) q int(input()) int input() input int(x) for x in input().split(" ") for x in input().split(" ") x input().split(" ") ().split () input split " " for x in input().split(" ") int(x) int x T = [int(x) for x in input().split(" ")] T [int(x) for x in input().split(" ")] count = 0 count 0 for key in T:
    if LinearSearch(S,N,key):
        count += 1 key T if LinearSearch(S,N,key):
        count += 1 LinearSearch(S,N,key) LinearSearch S N key count += 1 count 1 print(count) print count q = int(input()) int(input()) q T = [int(x) for x in input().split(" ")] [int(x) for x in input().split(" ")] T count += 1 1 count N = int(input()) int(input()) N def LinearSearch(A,n,key):
    i = 0
    A[n] = key
    while A[i] != key:
        i += 1
    return i != n def LinearSearch(A,n,key):
    i = 0
    A[n] = key
    while A[i] != key:
        i += 1
    return i != n LinearSearch count = 0 0 count S = [int(x) for x in input().split(" ")] [int(x) for x in input().split(" ")] S
def LinearSearch(A,n,key):
    i = 0
    A[n] = key
    while A[i] != key:
        i += 1
    return i != n

N = int(input())
S = [int(x) for x in input().split(" ")]
S.append(None)


q = int(input())
T = [int(x) for x in input().split(" ")]

count = 0

for key in T:
    if LinearSearch(S,N,key):
        count += 1
print(count)
