We start with the equation given in the problem:
\[ mn = 3m + 6n + 2m - 5n + 1. \]
First, we combine like terms on the right side:
\[ mn = (3m + 2m) + (6n - 5n) + 1, \]
which simplifies to:
\[ mn = 5m + n + 1. \]
Next, we rearrange the equation into a standard quadratic form:
\[ mn - 5m - n - 1 = 0. \]
Let’s introduce \(m\) and factor it out. We can rewrite the equation as:
\[ mn - 5m - n - 1 = 0 \implies m(n - 5) - n - 1 = 0. \]
This can be expressed as:
\[ m(n - 5) = n + 1. \]
From this, we can solve for \(m\):
\[ m = \frac{n + 1}{n - 5}. \]
For \(m\) to be an integer, the right-hand side must also be an integer, which implies that \(n - 5\) must divide \(n + 1\).
Now let's express \(n + 1\) in terms of \(n - 5\):
\[ n + 1 = (n - 5) + 6. \]
Hence:
\[ m = \frac{(n - 5) + 6}{n - 5} = 1 + \frac{6}{n - 5}. \]
For \(m\) to be an integer, \(\frac{6}{n - 5}\) must also be an integer. This means that \(n - 5\) must be a divisor of 6.
The divisors of 6 are \( \pm 1, \pm 2, \pm 3, \pm 6\). Let’s evaluate the possible values of \(n - 5\) based on these divisors:
- \(n - 5 = 1 \implies n = 6\)
- \(n - 5 = -1 \implies n = 4\)
- \(n - 5 = 2 \implies n = 7\)
- \(n - 5 = -2 \implies n = 3\)
- \(n - 5 = 3 \implies n = 8\)
- \(n - 5 = -3 \implies n = 2\)
- \(n - 5 = 6 \implies n = 11\)
- \(n - 5 = -6 \implies n = -1\)
Now we substitute each of these values back into the formula for \(m\):
- If \(n = 6\), then \(m = 1 + \frac{6}{1} = 7\).
- If \(n = 4\), then \(m = 1 + \frac{6}{-1} = -5\).
- If \(n = 7\), then \(m = 1 + \frac{6}{2} = 4\).
- If \(n = 3\), then \(m = 1 + \frac{6}{-2} = -2\).
- If \(n = 8\), then \(m = 1 + \frac{6}{3} = 3\).
- If \(n = 2\), then \(m = 1 + \frac{6}{-3} = -1\).
- If \(n = 11\), then \(m = 1 + \frac{6}{6} = 2\).
- If \(n = -1\), then \(m = 1 + \frac{6}{-6} = 0\).
So, we have the following ordered pairs \((m, n)\):
- \((7, 6)\)
- \((-5, 4)\)
- \((4, 7)\)
- \((-2, 3)\)
- \((3, 8)\)
- \((-1, 2)\)
- \((2, 11)\)
- \((0, -1)\)
Thus, we find a total of 8 ordered pairs \((m,n)\) satisfying the original equation. Therefore, the final answer is:
\[ \boxed{8}. \]