7. Given that for any real numbers $x, y$, the function $f(x)$ satisfies $f(x)+f(y)=f(x+y)+xy$.
If $f(1)=m$, then the number of positive integer pairs $(m, n)$ that satisfy $f(n)=2019$ is $\qquad$.
7.8 .

Let $y=1$, we get
$$
\begin{array}{l}
f(x)+f(1)=f(x+1)+x \\
\Rightarrow f(x+1)-f(x)=m-x .
\end{array}
$$

Then $f(x)=f(1)+\sum_{k=1}^{x-1}(f(k+1)-f(k))$
$$
=m x-\frac{1}{2} x(x-1) \text {. }
$$

Also, $2019=f(n)=m n-\frac{1}{2} n(n-1)$, so
$$
n(2 m+1-n)=2 \times 3 \times 673 \text {. }
$$

When $n$ is even, $2 m+1-n$ takes 4 odd values. Similarly, when $n$ is odd, there are also 4.
In total, there are 8 pairs of positive integers that satisfy the condition.