Find the dimension of $n$ by $n$ matrices such that $Ae_{ij} = e_{ij}A$. Where $e_{ij}$ is a matrix with $1$ in position $(i,j)$ and $0$ elsewhere.
So $Ae_{ij}$ takes the takes $i$th column of $A$ by inserting $j-1$ columns of $0$ before it and completing matrix up to the number of columns of matrix $e$ by also inserting columns of $0$.
For example if $\begin{bmatrix}4&5&6\\7&8&9\\1&2&3\end{bmatrix}$ $\begin{bmatrix}0&0&1\\0&0&0\\0&0&0\end{bmatrix} = \begin{bmatrix}0&0&4\\0&0&7\\0&0&1\end{bmatrix}$
At the same time $e_{ij}A$ takes the $j$th row of $A$ and setting $0$'s else.
As you said, the matrix $Ae_{ij}$ is a matrix with the $i$-th column of $A$ at the $j$-th column position of $Ae_{ij}$. Also the matrix $e_{ij}A$ is a matrix with the $j$-th row of $A$ at the $i$-th row position of $e_{ij}A$. If these two matrices be equal, then all the elements of the $i$-th column and $j$-th row of $A$ must be zero, except that one which is common in position between them for which we have $$a_{ii}=a_{jj}$$(recall your own example for that). Therefore the dimension is $n^2-2n+2$ when $i\ne j$ and $n^2-2n+3$ when $i=j$.