7. Given the sequence $\left\{a_{n}\right\}$ satisfies $a_{1}=1, S_{n+1}=2 S_{n}-\frac{n(n+1)}{2}+1$, where, $S_{n}=a_{1}+a_{2}+\cdots+a_{n}$ $(n=1,2, \cdots)$. If we define $\Delta a_{n}=a_{n+1}-a_{n}$, then the number of elements in the set $S=\left\{n \in \mathbf{N}^{*} \mid \Delta\left(\Delta a_{n}\right) \geqslant-2015\right\}$ is $\qquad$
7. 11 .

From the problem, we get
$$
\begin{array}{l}
S_{n+1}=2 S_{n}-\frac{n(n+1)}{2}+1 \\
S_{n}=2 S_{n-1}-\frac{(n-1) n}{2}+1 \quad(n \geqslant 2)
\end{array}
$$
(1) - (2), we get
$$
a_{n+1}=2 a_{n}-n \quad(n \geqslant 2) .
$$

Taking $n=1$ in equation (1), we get $a_{1}+a_{2}=2 a_{1}-1+1$, which means $a_{2}=a_{1}=1$.
Then from equation (3), we get
$$
a_{n+1}=2 a_{n}-n \quad(n \geqslant 1) .
$$

Therefore,
$$
a_{n+1}-(n+2)=2\left(a_{n}-(n+1)\right) \text {. }
$$

Let $a_{n}-n-1=b_{n}$, then $b_{n+1}=2 b_{n}, b_{1}=a_{1}-2=-1$. Thus, $b_{n}=-2^{n-1}(n \geqslant 1)$. So, $a_{n}=-2^{n-1}+n+1(n \geqslant 1)$.
By definition $\Delta a_{n}=a_{n+1}-a_{n}$, we get
$$
\begin{aligned}
\Delta\left(\Delta a_{n}\right) & =\Delta a_{n+1}-\Delta a_{n}=\left(a_{n+2}-a_{n+1}\right)-\left(a_{n+1}-a_{n}\right) \\
& =\left(a_{n+1}-n-1\right)-\left(a_{n}-n\right)=\left(-2^{n}+1\right)-\left(-2^{n-1}+1\right) \\
& =-2^{n-1}
\end{aligned}
$$

Let $-2^{n-1} \geqslant-2015$, we get $1 \leqslant n \leqslant 11$, hence $|S|=11$.