Step 1: Multiply both sides by \((x^2+4)^2\).
\[
4x^3+16x+7
=
(Ax+B)(x^2+4)+(Cx+D)
\]
Step 2: Expand the right-hand side.
\[
(Ax+B)(x^2+4)+(Cx+D)
\]
\[
=Ax^3+Bx^2+4Ax+4B+Cx+D
\]
\[
=Ax^3+Bx^2+(4A+C)x+(4B+D)
\]
Step 3: Compare coefficients.
Compare with
\[
4x^3+0x^2+16x+7.
\]
So,
\[
A=4
\]
\[
B=0
\]
\[
4A+C=16
\]
\[
4B+D=7
\]
Step 4: Find \(C\) and \(D\).
Since
\[
A=4,
\]
we get
\[
4(4)+C=16
\]
\[
16+C=16
\]
\[
C=0
\]
Also, since
\[
B=0,
\]
\[
4(0)+D=7
\]
\[
D=7
\]
Thus,
\[
A=4,\quad B=0,\quad C=0,\quad D=7.
\]
Step 5: Count the non-zero values.
The non-zero values are
\[
A=4
\]
and
\[
D=7.
\]
Hence, the number of non-zero values is
\[
2.
\]
Step 6: Final conclusion.
Therefore,
\[
\boxed{2}
\]