  The concept of S-permutation matrix is considered. A general formula for
counting all disjoint pairs of $n^2 \times n^2$ S-permutation matrices as a
function of the positive integer $n$ is formulated and proven in this paper. To
do that, the graph theory techniques have been used. It has been shown that to
count the number of disjoint pairs of $n^2 \times n^2$ S-permutation matrices,
it is sufficient to obtain some numerical characteristics of all $n\times n$
bipartite graphs.
