A store sells many kinds of products and their barcodes are known, given as a sorted list. A manufacturer delivers a list of barcodes of its own products, in no particular order. Your task is to determine how many of the manufacturer's products are already sold in the store.
Input
The first line contains a single integer - the number of testcases.
- The first line of each testcase contains two integers and - the number of products in the store and the number of the manufacturer's products.
- The next line contains integers in increasing order - the barcodes of the products in the store.
- The next line contains integers - the barcodes of the manufacturer's products.
Output
For every testcase print a single line with the number of the manufacturer's barcodes that appear on the store's list.
Example
1 5 5 1 3 5 6 7 2 3 4 5 8
2
Of the manufacturer's barcodes, only and appear on the store's list.
Constraints
Both the sum of and the sum of over all testcases are at most .
This problem was adapted, with permission, from Provera bar-kodova, authored by Društvo matematičara Srbije and Fondacija Petlja.