How many ordered triples $(a,b,c)$ of integers satisfy the inequality \[a^2+b^2+c^2 \leq a+b+c+2?\]

Let $T = TNYWR$. David rolls a standard $T$-sided die repeatedly until he first rolls $T$, writing his rolls in order on a chalkboard. What is the probability that he is able to erase some of the numbers he's written such that all that's left on the board are the numbers $1, 2, \dots, T$ in order?

1. We start with the inequality \(a^2 + b^2 + c^2 \leq a + b + c + 2\).
2. To simplify this inequality, we complete the square for each variable. Rewrite the inequality as:
   \[
   a^2 - a + b^2 - b + c^2 - c \leq 2
   \]
3. Completing the square for each term:
   \[
   a^2 - a = \left(a - \frac{1}{2}\right)^2 - \frac{1}{4}
   \]
   \[
   b^2 - b = \left(b - \frac{1}{2}\right)^2 - \frac{1}{4}
   \]
   \[
   c^2 - c = \left(c - \frac{1}{2}\right)^2 - \frac{1}{4}
   \]
4. Substitute these into the inequality:
   \[
   \left(a - \frac{1}{2}\right)^2 - \frac{1}{4} + \left(b - \frac{1}{2}\right)^2 - \frac{1}{4} + \left(c - \frac{1}{2}\right)^2 - \frac{1}{4} \leq 2
   \]
5. Simplify the inequality:
   \[
   \left(a - \frac{1}{2}\right)^2 + \left(b - \frac{1}{2}\right)^2 + \left(c - \frac{1}{2}\right)^2 \leq 2 + \frac{3}{4}
   \]
   \[
   \left(a - \frac{1}{2}\right)^2 + \left(b - \frac{1}{2}\right)^2 + \left(c - \frac{1}{2}\right)^2 \leq \frac{11}{4}
   \]
6. Multiply through by 4 to clear the fraction:
   \[
   (2a - 1)^2 + (2b - 1)^2 + (2c - 1)^2 \leq 11
   \]
7. Each term \((2a - 1)^2\), \((2b - 1)^2\), and \((2c - 1)^2\) must be a perfect square. The possible values for each term are 0, 1, 4, and 9, since these are the perfect squares less than or equal to 11.
8. We need to find all combinations of these values that sum to 11 or less:
   - \((1, 1, 1)\)
   - \((9, 1, 1)\) and permutations
9. Count the number of valid ordered triples:
   - \((1, 1, 1)\) gives 1 combination.
   - \((9, 1, 1)\) and its permutations give \(3! / 2! = 3\) combinations.
10. Total number of ordered triples:
   \[
   1 + 3 = 4
   \]

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