What does "counted with multiplicity" mean in this proposition regarding roots of polynomials? I may have come to understand it as I was writing this; reasoning in the last paragraph

The proposition is as follows:

Given any nonconstant polynomial $f \in \mathbb{F}[x]$, the number of roots of $f$, counted with multiplicity, is at most $\deg(f)$

I'm just getting hung up on the phrase "counted with multiplicity." I believe I understand the rest of the proposition. Using an example of a quadratic polynomial it's obvious to me that, vis a vis the quadratic formula, at most we could find $2$ roots.
What I understand about multiplicity is that, analogous to the prime factorization theorem for the integers, there is a theorem for polynomials that says that any nonconstant polynomial $f \in \mathbb{F}[x]$ can be factored as $$f = ap_{1} \cdots p_{k}$$ Where $a \in \mathbb{F}\ \text{and}\ p_1,...,p_k \in \mathbb{F}[x]$ are monic, irreducible polynomials. The multiplicity of $\alpha$ (a root of $f$) is then the number of times $(x - \alpha)$ shows up in the factorization. In other words it's the number of monic, irreducible polynomials $p_i$ that take the form above. Correct?

With that said, "counted with multiplicity", does that phrase simply suggest that the way we determined that at most  the number of roots can be $n$ for $\deg(f) = n$ is because $(x-\alpha)$ is a linear polynomial and linear polynomials are the lowest degree polynomial that can be irreducible so given the fact that $\deg(p_{1} \cdots p_{k}) = \deg(p_1) + \cdots \deg(p_k)$ the most we could potentially get is $n$ linear polynomials and thus $n$ polynomials of the form $(x-\alpha)$ and hence $n$ roots? Is that correct thinking?
 A: When you factor a polynomial over a field each root corresponds to a linear factor. Some linear factors may repeat. So for example if
$$
p(x) = (x - \alpha)^2(x-\beta)q(x)
$$
and $q$ has no roots in the field then $p$ has three roots: $\alpha$ with multiplicity two and $\beta$ (with multiplicity one).
Counting the number of linear factors counts the roots with multiplicity. Clearly the number of linear factors can't exceed the degree of $p$.
Note: that the coefficients come from a field is important. In the ring $\mathbb{Z}_8[x]$ the polynomial $x^2-1$ has four roots, since every odd square is congruent to $1$ modulo $8$.
It factors as
$$
x^2 - 1 = (x-1)(x-7) = (x-3)(x-5).
$$
A: A few different ways of looking at it:

Admitting Copies:
You can think of it as meaning "a polynomial of degree $n$ has $n$ roots, when we allow for copies". For instance, in $\newcommand{\R}{\mathbb{R}}
\newcommand{\F}{\mathbb{F}}
\R[x]$,
$$f(x) = x^2 - 2x + 1 = (x-1)^2$$
We count that $1$ twice, since its linear factor is squared. We could also write
$$f(x) = (x-1)(x-1)$$
for instance. And we know it is a root "twice" since $1$ is still a root of $f(x)/(x-1)$, which leads into another framing...

Multisets:
Consider defining a multiset. (A set will exclude repeat entries, i.e. $\{1,1\}=\{1\}$, but a multiset does not.) Define, given $f \in \F[x]$,
$$
S_f := \left\{ (r,m) \in \F \times \mathbb{Z}_{\ge 1} \,\middle|\, \frac{f(r)}{(x-r)^{m-1} } = 0 \right\}
$$
Then this theorem says that $|S_f| \le \deg(f)$. ($r$ corresponds to roots, and $m$ to multiplicity.)
To see how this works, consider the example
$$f(x) = (x-2)^3 (x-1)^2 (x+1) \in \R[x]$$
Then

*

*$f(x) = 0$ when $x=2$

*$f(x)/(x-2) = 0$ when $x=2$

*$f(x)/(x-2)^2 = 0$ when $x=2$

*$f(x) = 0$ when $x=1$

*$f(x)/(x-1) = 0$ when $x=1$

*$f(x) = 0$ when $x=-1$
but

*

*$f(x)/(x-2)^3 \ne 0$ for $x = 2$

*$f(x)/(x-1)^2 \ne 0$ for $x = 1$

*$f(x)/(x+1) \ne 0$ for $x = -1$
so
$$S_f = \{(2,1),(2,2),(2,3),(1,1),(1,2),(-1,1)\}$$
and $\deg(f) = 6 = |S_f|$.

Factorization:
Perhaps the most explicit: how would we write this out? Given the factorization of $f \in \F[x]$, we can write (for some $a \in \F$ and $r_i \in \F$ the roots with multiplicities $m_i \in \mathbb{Z}$),
$$
f(x) = a \prod_i (x - r_i)^{m_i}
$$
Then the theorem says that $\displaystyle \deg(f) \ge \sum_i m_i$

Addendum: "At Most"
Not every $f \in \F[x]$ need factor into linear factors for given $f,\F$. Sometimes they do (in what we call an algebraically closed field; $\mathbb{C}$ is an example of one). In the above examples, for simplicity, they did, but it might not hold in $\R[x]$ in general. For instance, $f(x) = x^2 + 1$ has zero roots in $\R$, hence the "at most".
Possibly already known to you but I wanted to address the possible contrived-ness of the examples.


The multiplicity of $\alpha$ (a root of $f$) is then the number of times $(x - \alpha)$ shows up in the factorization. In other words it's the number of monic, irreducible polynomials $p_i$ that take the form above. Correct?

Yes, if you only allow powers of $1$ and write
$$f(x) = a \prod_{i=1}^{\deg(f)} (x - r_i) = a \prod_{i=1}^{\deg(f)} p_i(x)$$
(for $r_i$ roots and $p_i(x) := x-r_i$), then the number of times $p_i$ appears in that product is the multiplicity of the root $r_i$. (Though I feel somewhat adverse to this framing since then you have a bunch of root-multiplicity pairs that themselves are not distinct, but I suppose as long as it's not taken as a rigorous definition, all is fine.)


does that phrase simply suggest that the way we determined that at most  the number of roots can be $n$ for $deg(f) = n$ is because $(x-\alpha)$ is a linear polynomial and linear polynomials are the lowest degree polynomial that can be irreducible so given the fact that $deg(p_{1} \cdots p_{k}) = deg(p_1) + \cdots deg(p_k)$ the most we could potentially get is $n$ linear polynomials and thus $n$ polynomials of the form $(x-\alpha)$ and hence $n$ roots?

Depends on how you look at it.
Are you suggesting this might be the proof? If so, I wouldn't be convinced.
As a heuristic? Yeah, sure, I suppose.
