link - https://www.codechef.com/problems/LCPESY

this as I understand it is a character counting problem, can anyone tell me why this is wrong?

```
# cook your dish here
for tc in range(int(input())):
str1 = list(input())
str2 = list(input())
count = 0
str1.sort()
str2.sort()
l = min(len(str1),len(str2))
for i in range(l):
if str1[i] == str2[i]:
count += 1
print(count)
```