Let $S$ be a non-empty subset of positive integers. A partition of a positive integer $n$ into $S$ is a finite nondecreasing sequence of positive integers $a_1, a_2, \dots , a_r$ in $S$ with repetitions allowed such that $\sum ^r_{i=1} a_i = n$. Here we apply Pólya’s enumeration theorem to find the number $¶(n;S)$ of partitions of $n$ into $S$, and the number ${\mathrm DP}(n;S)$ of distinct partitions of $n$ into $S$. We also present recursive formulas for computing $¶(n;S)$ and ${\mathrm DP}(n;S)$.