Given two multisets $A$ and $B$, is it possible to map all of the elements of these two multisets into two integer (for example, integer $A_1$ will represent the elements of multiset $A$, and integer $B_1$ will represent the elements of multiset $B$), in a way that allows for the number of intersections of multiset $A$ and $B$ to be found using only the integers $A_1$ and $B_1$?
For example, if multiset $A = \{1,2,3,4,5\}$ and multiset $B = \{7, 1, 2, 6, 7, 8\}$, then these two multisets should be able to be mapped to two integers that represent the data in these two multisets ($A_1$ and $B_1$), such that the number of intersections of these two multisets should be able to be computed using only the integers $A_1$ and $B_1$ (without using the underlying data). The number of intersections of the multisets $A$ and $B$ in this case is 2.