No, the degree has nothing to do with how many terms.
Remember that the degree of a polynomial is the
highest power of 
.
Since you reduced it down to fractions with quadratic functions (degree 2) in the denominators, that means that the numerators could be anything up to a linear function (degree 1).
And to answer your other question:
You have
x^3 + (B + D)x^2 + (A + 4C)x + B + 4D = x^2 + 3x + 1)
.
Notice that I could rewrite the the equation so that it looks like this:
x^3 + (B + D)x^2 + (A + 4C)x^1 + (B + 4D)x^0 = 0x^3 + 1x^2 + 3x^1 + 1x^0)
.
The left hand side can only equal the right hand side if the coefficients of like powers of

are equal.
Since the coefficient of

is

, that means for LHS to equal RHS,

.
Similarly, the coefficient of

is

. So for LHS to equal RHS,

.
Using the same logic,

and

.
That gives you four equations in four unknowns that you can solve simultaneously.