#include <stdio.h>
#include <string.h>

int main() {
    int B;
    scanf("%d", &B);
    
    char terms[20][101];
    for (int i = 0; i < B; i++) {
        scanf("%s", banned[i]);
    }
  
    FILE *fp = fopen("source_words.txt", "r");
    if (fp == NULL) {
        printf("ERROR: Could not open file source_words.txt\n");
        return 1;
    }
    
    char word[101];
    int count = 0;
    
    while (fscanf(fp, "%s", word) != EOF)
    {
        for (int i = 0; i < B; i ++) {
            if (strcmp(word, banned[i]) == 0) {
                count ++;
            }
        }
    }
    
    fclose(fp);
    
    printf("Total number of keywords found: %d", count);
    
    return 0;
}