Example 2.8 In the integers from 1 to 100, how many integers can be divided by exactly two of the four integers 2, $3, 5, 7$?
Let $S=\{1,2, \cdots, 100\}$. Suppose $s \in S$, if $s$ is divisible by $2,3,5,7$, then $s$ is said to have properties $a_{1}, a_{2}, a_{3}, a_{4}$, respectively. Using the notation from Corollary 2.3, the number of integers sought is
$$
\begin{aligned}
N(2)= & \sum_{k=2}^{4}(-1)^{k-2}\binom{k}{2} \sum_{1 \leqslant i_{1}<i_{2}<\cdots<i_{k} \leqslant 4} N\left(a_{i_{1}} a_{i_{2}} \cdots a_{i_{k}}\right) \\
= & N\left(a_{1} a_{2}\right)+N\left(a_{1} a_{3}\right)+N\left(a_{1} a_{4}\right)+N\left(a_{2} a_{3}\right)+ \\
& N\left(a_{2} a_{4}\right)+N\left(a_{3} a_{4}\right)-3\left[N\left(a_{1} a_{2} a_{3}\right)+N\left(a_{1} a_{2} a_{4}\right)+\right. \\
& \left.N\left(a_{1} a_{3} a_{4}\right)+N\left(a_{2} a_{3} a_{4}\right)\right]+6 N\left(a_{1} a_{2} a_{3} a_{4}\right) \\
= & {\left[\frac{100}{2 \times 3}\right]+\left[\frac{100}{2 \times 5}\right]+\left[\frac{100}{2 \times 7}\right]+\left[\frac{100}{3 \times 5}\right]+} \\
& {\left[\frac{100}{3 \times 7}\right]+\left[\frac{100}{5 \times 7}\right]-3 \times\left(\left[\frac{100}{2 \times 3 \times 5}\right]+\right.} \\
& {\left.\left[\frac{100}{2 \times 3 \times 7}\right]+\left[\frac{100}{2 \times 5 \times 7}\right]+\left[\frac{100}{3 \times 5 \times 7}\right]\right)+ } \\
& 6 \times\left[\frac{100}{2 \times 3 \times 5 \times 7}\right] \\
= & 16+10+7+6+4+2-3 \times(3+2+1+0)+6 \times 0 \\
= & 27 .
\end{aligned}
$$