Example 5 Some scientists work in a research institute. On a certain day during the 8-hour work period, each scientist visited the coffee shop at least once. It is known that for any two scientists, the total time that at least one of them was in the coffee shop is at least $x(x>4)$ hours. Find the maximum possible number of scientists working in the institute (depending on $x$).
Let the research institute have $n$ scientists. $t_{ij}$ represents the time when exactly one of the $i$-th and $j$-th scientists is in the coffee room.
Let $S=\sum_{1 \leqslant i<j \leqslant n} t_{i}$. Then $S \geqslant \mathrm{C}_{n}^{2} x$.
On the other hand, divide the 8-hour workday into finite segments $t_{1}, t_{2}, \cdots, t_{m}$, such that no scientist enters or leaves the coffee room during each segment.

Suppose there are $k_{i}$ scientists in the coffee room during the time segment $t_{i}$. Then
$$
\begin{array}{l}
S=\sum_{i=1}^{m} t_{i} k_{i}\left(n-k_{i}\right) \\
\leqslant \sum_{i=1}^{m} t_{i}\left[\frac{n}{2}\right]\left(n-\left[\frac{n}{2}\right]\right) \\
=8\left[\frac{n}{2}\right]\left(n-\left[\frac{n}{2}\right]\right) \text {, } \\
\end{array}
$$

where $[x]$ denotes the greatest integer not exceeding the real number $x$.
Thus, $8\left[\frac{n}{2}\right]\left(n-\left[\frac{n}{2}\right]\right) \geqslant \frac{n(n-1)}{2} x$.
If $n=2 l$, then
$8 l^{2} \geqslant l(2 l-1) x$
$\Rightarrow l \leqslant \frac{x}{2 x-8} \Rightarrow n \leqslant 2\left[\frac{x}{2 x-8}\right]$.
If $n=2 l+1$, then
$8 l(l+1) \geqslant l(2 l+1) x$
$\Rightarrow l \leqslant \frac{8-x}{2 x-8}$
$\Rightarrow n \leqslant 2\left[\frac{8-x}{2 x-8}\right]+1=2\left[\frac{x}{2 x-8}\right]-1$.
In summary, $n \leqslant 2\left[\frac{x}{2 x-8}\right]$.
Below is an example showing that the above inequality can be achieved.
Let $n=2 l=2\left[\frac{x}{2 x-8}\right]$. Let $k=\mathrm{C}_{n}^{l}$.
Divide the 8-hour workday into $k$ equal segments, each corresponding to $l$ out of the $n$ scientists, with different segments corresponding to different sets of people. By symmetry, for any two scientists, the total time when exactly one of them is in the coffee room is the same, denoted as $y$. Then
$$
8 l(2 l-l)=S=\frac{2 l(2 l-1)}{2} y .
$$

Thus, $y=\frac{8 l}{2 l-1} \geqslant x\left(\right.$ equivalent to $\left.l=\frac{x}{2 x-8}\right)$. Hence, the condition is satisfied.