#include <stdio.h>
#include <string.h>
int main() {
    int K;
    scanf("%d", &K);
    char restricted[50][101];
    for(int i=0; i<K; i++)
    {
        scanf("%s",restricted[i]);
    }
    FILE *fp = fopen("testdata.txt.","r");
    if (fp == NULL){
        printf("Couldn't open testdata.txt.\n");
        return 1;
    }
    char word[101];
    int count = 0;
    while (fscanf(fp, "%100s, word) ==1) {
        for (int i=0; i < K; i++){
            if(strcmp (word, restricted[i])==0){
        
        count ++;
            }
    }
}
fclose(fp);
printf("Total number of keywords found: %d\n", count);
return 0;
}