Example 2.1 Among the integers from 1 to 300, how many integers are divisible by 7 and also by 2 or 5?
Solution: Let the required number be $N$. Let $S=\{1,2, \cdots, 300\}$, and let $A$ and $B$ be the sets of integers in $S$ that are divisible by $7 \times 2=14$ and $7 \times 5=35$, respectively. Then $N=|A \cup B|$. By Theorem 2.1, we have
$$
\begin{aligned}
N & =|A|+|B|-|A \cap B| \\
& =\left[\frac{300}{14}\right]+\left[\frac{300}{35}\right]-\left[\frac{300}{7 \times 2 \times 5}\right] \\
& =21+8-4=25 .
\end{aligned}
$$