It is well known that the knowledge of the characteristic polynomial $p(x)$ and of the minimal polynomial $m(x)$ of an $3 \times 3$ matrix , determines its Jordan Normal form. But for an $n \times n$ matrix with $n>3$ we can have more than one Jordan form for given $p(x)$ and $m(x)$.
As an example, for a $6\times 6$ matrix with $p(x)=(x-2)^4(x-3)^2$ and $m(x)=(x-2)^2(x-3)^2$ we can have two (not similar) Jordan forms, one with one block of dimension $2$ for the eigenvalue $x=2$ and the other with two blocks of dimension $2$ for this same eigenvalue.
Given the dimension of the matrix and the two polynomials $p(x)$ and $m(x)$, I can enumerate the possible Jordan forms, using the fact that the $p(x)$ gives all the eigenvalues with their algebraic multiplicity and $m(x)$ gives the maximum dimension of the Jordan blocks for any eigenvalue.
But, for increasing $n$, this procedure becomes a long road, so I'm searching if there is some formula that counts the possible Jordan forms for given $p(x)$ and $m(x)$, also for matrices of great dimension.
More general: for an $n \times n$ matrix how many consistent couples of factorizations of the characteristic and minimal polynomial we can have? And how many non similar Jordan forms are compatible with any couple of factorizations? And eventually, how many are all the possible Jordan forms (not similar) for a given set of eigenvalues?
PS: this question is related to the other question that, maybe, can be useful for an answer (but I don't see how...)