A die is thrown six times. How many ways are there for the six rolls to sum to $21$?
1. **Understanding the Problem:**
   We need to find the number of ways to roll a die six times such that the sum of the outcomes is 21. Each die roll can result in any of the numbers from 1 to 6.

2. **Generating Function Approach:**
   The generating function for a single die roll is:
   \[
   x + x^2 + x^3 + x^4 + x^5 + x^6
   \]
   This represents the possible outcomes of a single die roll.

3. **Generating Function for Six Rolls:**
   Since we are rolling the die six times, we need the generating function for six rolls, which is:
   \[
   (x + x^2 + x^3 + x^4 + x^5 + x^6)^6
   \]

4. **Finding the Coefficient of \(x^{21}\):**
   We need to find the coefficient of \(x^{21}\) in the expansion of:
   \[
   (x + x^2 + x^3 + x^4 + x^5 + x^6)^6
   \]

5. **Simplifying the Generating Function:**
   Notice that:
   \[
   x + x^2 + x^3 + x^4 + x^5 + x^6 = x \frac{1 - x^6}{1 - x}
   \]
   Therefore, the generating function becomes:
   \[
   \left( x \frac{1 - x^6}{1 - x} \right)^6 = x^6 \left( \frac{1 - x^6}{1 - x} \right)^6
   \]

6. **Expanding the Generating Function:**
   We need the coefficient of \(x^{21}\) in:
   \[
   x^6 \left( \frac{1 - x^6}{1 - x} \right)^6
   \]
   This is equivalent to finding the coefficient of \(x^{15}\) in:
   \[
   \left( \frac{1 - x^6}{1 - x} \right)^6
   \]

7. **Using the Binomial Theorem:**
   We can expand \(\left( \frac{1 - x^6}{1 - x} \right)^6\) using the binomial theorem:
   \[
   \left( \frac{1 - x^6}{1 - x} \right)^6 = \left( \sum_{k=0}^{\infty} x^k \right)^6 - \left( \sum_{k=0}^{\infty} x^{6k} \right)^6
   \]
   We need the coefficient of \(x^{15}\) in this expansion.

8. **Finding the Coefficient:**
   The coefficient of \(x^{15}\) in \(\left( \sum_{k=0}^{\infty} x^k \right)^6\) is given by the number of ways to partition 15 into 6 parts, each part being at least 0. This is a classic combinatorial problem and can be solved using the stars and bars method:
   \[
   \binom{15 + 6 - 1}{6 - 1} = \binom{20}{5}
   \]
   The coefficient of \(x^{15}\) in \(\left( \sum_{k=0}^{\infty} x^{6k} \right)^6\) is 0 because 15 is not a multiple of 6.

9. **Calculating the Binomial Coefficient:**
   \[
   \binom{20}{5} = \frac{20!}{5! \cdot 15!} = 15504
   \]

10. **Subtracting the Overcounted Terms:**
    Since there are no overcounted terms in this case, the final coefficient is:
    \[
    15504
    \]

The final answer is \(\boxed{15504}\)