n = int(input())
S = list(map(int, input().split()))
q = int(input())
T = map(int, input().split())

def ls(A, k):
    for a in A:
        if k == a:
            return True
    return False

print(sum([ls(S, t) for t in T])) n = int(input()) n int(input()) int input() input S = list(map(int, input().split())) S list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split q = int(input()) q int(input()) int input() input T = map(int, input().split()) T map(int, input().split()) map int input().split() ().split () input split def ls(A, k):
    for a in A:
        if k == a:
            return True
    return False ls for a in A:
        if k == a:
            return True
     a A if k == a:
            return True
     k == a k a return True True return False False A A k k ls(S, t) for t in T for t in T t T for t in T ls(S, t) ls S t print(sum([ls(S, t) for t in T])) print sum([ls(S, t) for t in T]) sum [ls(S, t) for t in T] n = int(input()) int(input()) n q = int(input()) int(input()) q S = list(map(int, input().split())) list(map(int, input().split())) S T = map(int, input().split()) map(int, input().split()) T def ls(A, k):
    for a in A:
        if k == a:
            return True
    return False def ls(A, k):
    for a in A:
        if k == a:
            return True
    return False ls
n = int(input())
S = list(map(int, input().split()))
q = int(input())
T = map(int, input().split())

def ls(A, k):
    for a in A:
        if k == a:
            return True
    return False

print(sum([ls(S, t) for t in T]))