# Counting ways to partition a set into fixed number of subsets

Suppose we have a finite set $S$ of cardinality $n$. In how many ways can we partition it into $k$-many non empty subsets?

Example: There is precisely one way to partition such a set into $n$-many subsets. and there is one way to partition into a single (sub)set.

What you want is the Stirling numbers of the second kind. A Stirling number of the second kind counts the number of ways to partition a set of $n$ objects into $k$ non-empty subsets. It is usually denoted by $\left\{ n \atop k \right\}$.