Let's say there are $n$ residents, $b$ of which have blue dots.
The stranger's statement is something like
"The number of blue dots is in the set $B$".
where $B$ is a subset of $\{1,2,\dots,n\}$ which is neither empty nor the whole set. We will assume the statement is true, namely, that $b\in B$.
Let's investigate which values of $b$ will cause a resident to kill themself on their first day.
If a resident has a blue dot, they will see $b-1$ blue dots, so they know the number of blue dots is $b-1$ or $b$. If $b-1\notin B$, the stranger's statement eliminates the $b-1$ case, so the resident learns their eye color is blue and kills themself.
Similarly, a red-dotted resident will suicide if $b+1\notin B$.
This means that a suicide will happen if $b$ is "near the boundary" of $B$. Below is an example, where the $\color{blue}{\text{blue}}$ numbers are in $B$, and the underlined values are the ones which result in a suicide:
$$
{\color{blue}{0}}\,\,\color{blue}1\,\, \color{blue}2\,\,\underline{\color{blue}3}\,\,{4}\,\,5\,\,{6}\,\,\underline{\color{blue}7}\,\,\color{blue}8\,\,\color{blue}9\,\,\color{blue}{10}\,\,\color{blue}{11}\,\,\underline{\color{blue}{12}}\,\,{13}\,\,\underline{\color{blue}{14}}\,\,\underline{\color{blue}{15}}\,\,16\,\ \underline{\color{blue}{17}}
$$
If there are no suicides, then none of the underlined values are possible, so the set of possible values of $b$ shrinks. On the next day, there will be a suicide if $b$ is near the boundary of this shrunken set, and no suicide causes the set to shrink again.
Eventually, the boundary will shrink to be next to the true value, $b$, causing one of the colors to suicide, and the other color to suicide on the next day.