The bivariate generating function of the Stirling numbers of the second kind is given by
$$G(z,u) = \exp(u(\exp(z)-1))$$
so that $$n! [z^n][u^k] G(z, u) = {n \brace k}.$$
If you want to forbid subsets of $r$ elements, mark them and the generating function becomes
$$H(z,u) = \exp\left(uv\frac{z^r}{r!} - u \frac{z^r}{r!} + u(\exp(z)-1)\right)
= \exp\left(uv\frac{z^r}{r!} - u \frac{z^r}{r!}\right)G(z,u).$$
This has the property that the coefficient of $[v^0]$ is the generating function of the partitions with sets of size $r$ not allowed, which is
$$[v^0] H(z, u) = [v^0]
\exp\left(uv\frac{z^r}{r!} \right)
\exp\left(-u\frac{z^r}{r!} \right)
G(z,u) \\=
\exp\left(-u\frac{z^r}{r!} \right)
G(z,u) .$$
Now extracting the coefficient of $[z^n]$ from this we find
$$n! \sum_{q=0}^{\lfloor n/r\rfloor} \frac{1}{q!} \left(-\frac{u}{r!}\right)^q
[z^{n-qr}] G(z, u) .$$
We then obtain for the coefficient of $[u^k]$ the formula
$$n! \sum_{q=0}^{\min(k, \lfloor n/r\rfloor)}
\frac{(-1)^q}{q!\times (r!)^q} [u^{k-q}] [z^{n-qr}] G(z, u)
\\= n! \sum_{q=0}^{\min(k, \lfloor n/r\rfloor)} \frac{1}{(n-qr)!}
\frac{(-1)^q}{q!\times (r!)^q} [u^{k-q}] (n-qr)! [z^{n-qr}] G(z, u) \\
= n! \sum_{q=0}^{\min(k, \lfloor n/r\rfloor)} \frac{1}{(n-qr)!}
\frac{(-1)^q}{q!\times(r!)^q} {n-qr \brace k-q}.$$
This formula gives the number of set partitions of $n$ elements into $k$ sets with subsets of size $r$ not allowed. Subtract this from ${n\brace k}$ to get the number of partitions where there is at least one subset of $r$ elements.
The OEIS has the case of $k=2$ and $r=1$, the case of $k=3$ and $r=1$ and the case of $k=4$ and $r=1$.
Observation. There is an interesting sanity check here, namely what happens when $r>n$. In this case the formula should produce ordinary Stirling numbers because forbidding subsets of a size larger than the total count of available elements does not affect the statistic. And indeed we have $\lfloor n/r \rfloor = 0$ so that only $q=0$ contributes, giving
$$n! \frac{1}{n!}
\frac{1}{1\times(r!)^0} {n\brace k}
= {n\brace k},$$
so the check goes through and we get the correct value.
Let $m_2$ be greatest such that $m_2^2 \le 10000$, then there are $m_2$ squares between $1$ and $10000$, because if we list all the squares we have
$$\underbrace{1^2,\ 2^2,\ \dots, (m_2-1)^2,\ m_2^2}_{\le 10000},\ \underbrace{(m_2+1)^2,\ (m_2+2)^2,\ \cdots}_{>10000}$$
Define $m_3$ and $m_6$ similarly, and then apply inclusion-exclusion.
Best Answer
You know probably the number off all functions from $\lbrace 1,2,3 \rbrace$ to $\lbrace 1,2\rbrace$ and a function which is NOT surjective must be constant since the range has only two elements.