Lead your team to win the wrestlers world championship! You are the captain of a world-famous wrestling team. An Olympic-grade match is coming up, and you are determined not to let your team down. You also happen to be a competent programmer, so you are going to write a program to help your team win!
You have access to the strength ratings for each of your own team wrestlers, and each of the opponent wrestlers. A wrestler will win their match only when their strength rating is greater than their opponent's strength rating. You have to write a program that will calculate the optimum pairing for each of your own wrestlers against each of the opponent wrestlers, and then output the maximum number of matches that can be won as a result.
Input
Your program will take as input three strings:

The number of members per team (there will be an equal number of wrestlers on each team)
The strength rating of each of your team wrestlers, as a space-separated list
The strength rating of each of the opponent wrestlers, as a space-separated list

Note:

You don't have to take the first number if you don't want to. It's there if you want it for help iterating through the list/array/string.
The strength rating is a number between 1 and 10.
You may input the strength ratings as a list or array instead of a string.

Output
Calculate the optimum pairing for each of your own wrestlers against each of the opponent wrestlers, and then output the maximum number of matches that can be won as a result.
Test cases
Test case 1:
5
2 4 6 2 6
3 10 6 7 7

Output: 1
Test case 2:
10
1 9 5 5 1 6 2 8 3 6
6 10 2 8 2 3 5 6 10 10

Output: 6
Bounties
I will upvote all answers that meet the requirements and that include an explanation, to encourage participation and to educate other Code Golfers on how your program works.
There will be no accepted answer since I want to encourage programs in all languages.
This is code-golf so be as creative as you can!
Python 2, 59 57 bytes
-2 bytes thanks to @dingledooper!

lambda a,b:sum(b.sort()&lt;b&lt;[x]&gt;b.pop(0)for x in sorted(a))

Try it online!
A function that takes 2 lists as arguments, and returns the maximum number of matches that can be won.
Approach
For each opponent (from weakest to strongest), match that opponent with the weakest available member of my team that can win.
For example, let's say the strength of 2 teams (sorted) are as follow:
No.       1  2  3  4  5
Me       [2, 2, 4, 5, 8]
Opponent [3, 6, 7, 7, 9]


The 1st opponent has strength 3, so we need to match that with our 3rd team member.
The 2nd opponent has strength 6, so we match that with our 5th.

We cannot win any more match. So in total we can win at most 2 matches.
Ungolfed code
a,b=map(sorted,input())  # sorted strength of my team and opponent team
s = 0                    # number of matches that can be won
for x in a:              # loop through my team, in order of increasing strength
  if x &gt; b[0]:             # if current member can beat the weakest opponent left
    s += 1                   # then match those two
    b.pop(0)                 # and remove the weakest opponent
                           # (otherwise, current member is useless)
print s