$\left\lceil \frac{n}{k} \right\rceil - \left\lfloor \frac{n}{k} \right\rfloor$ is equal to $0$ or $1$ depending on whether $k$ does or does not divide $n$. In other words,
$$\prod_{k=2}^{ \lceil \sqrt{n} \rceil} \left( \left\lceil \frac{n}{k} \right\rceil - \left\lfloor \frac{n}{k} \right\rfloor \right)$$
is equal to $0$ or $1$ depending on whether $n$ is composite or prime. So the function you are trying to describe is the prime counting function. There really is no simpler way to describe it than "the prime counting function," although a lot is known about its asymptotic behavior.
Edit: For functions like the prime counting function, you should replace the notion of "nice formula" with "fast algorithm" (the former being a special case of the latter). The formula you wrote down is equivalent to a very slow algorithm: use trial division to test the primality of all the integers in your range. There are much faster primality tests which translate into much faster algorithms for computing $\pi(n)$ even though these tests cannot be easily translated into familiar-looking formulas.
Edit #2: As Shreevatsar mentions in the comments, sieve theory is also relevant to counting or estimating $\pi(n)$ more directly, without having to do all that primality testing.