Theory of complexity – Counting on a matrix.

I have a $ n times m $ matrix, and fill it with numbers $ 1 sim k $

If a matrix can be converted into another matrix by exchanging its lines and exchanging its columns, it is considered that the two matrices are the same.

I know that I can easily calculate the numbers of the different matrices in $ O ((n times m) ^ k) $ time, but is there any other better algorithm for these problems?

I also wonder if $ texttt {Burnside's motto} $ or $ texttt {Polya's Theorem} $work here I'm not having ideas with them.