Suppose, two $n\times n$ binary matrices are $\it similar$ if one can be transformed to another by swapping any two rows or two columns any number of times.
My problem is: how many unique $n\times n$ binary matrices with a given number of 1s are there ? That is, those that are not $\it similar$ to any other matrix using the definition above?
For example, there are 7 unique $3\times 3$ matrices having 4 ones:
$\begin{array}{|ccc|}\hline 1 & 1 & .\\ 1 & 1 & .\\ . & . & .\\\hline\end{array} \begin{array}{|ccc|}\hline 1 & 1 & 1\\ 1 & . & .\\ . & . & .\\\hline\end{array} \begin{array}{|ccc|}\hline 1 & 1 & .\\ 1 & . & 1\\ . & . & .\\\hline\end{array}$
$\begin{array}{|ccc|}\hline 1 & 1 & .\\ 1 & . & .\\ 1 & . & .\\\hline\end{array} \begin{array}{|ccc|}\hline . & 1 & 1\\ 1 & . & .\\ 1 & . & .\\\hline\end{array}$
$\begin{array}{|ccc|}\hline 1 & 1 & .\\ 1 & . & .\\ . & 1 & .\\\hline\end{array} \begin{array}{|ccc|}\hline 1 & 1 & .\\ 1 & . & .\\ . & . & 1\\\hline\end{array}$
What I came up with is that two $\it similar$ matrices would have the same (sorted) column sums and row sums but, apparently, this is not enough. From the example above, one can see that the three last matrices:
$\begin{array}{|ccc|}\hline . & 1 & 1\\ 1 & . & .\\ 1 & . & .\\\hline\end{array} \begin{array}{|ccc|}\hline 1 & 1 & .\\ 1 & . & .\\ . & 1 & .\\\hline\end{array} \begin{array}{|ccc|}\hline 1 & 1 & .\\ 1 & . & .\\ . & . & 1\\\hline\end{array}$
would have $(2, 2, 1)$ rows sum and $(2, 2, 1)$ column sum.
There is some similarity with Young diagrams and conjugate/self-conjugate integer partitions.. but the idea how to count these matrices I do not understand, any help would be appreciated.