$[X,Y]$ is finite where $X$ is finite connected CW-complex, and $Y$ has finite homotopy groups I have read this question in Allen Hatcher's book Algebraic Topology, (exercise 20, page 359):

Show that $[X,Y]$ is finite if $X$ is a finite connected CW complex and $ \pi_i(Y) $ is finite for $ i \leq d:=\dim(X) $.

I tried to use induction, assuming $ [X^{d-1},Y] $ is finite (where $ X^{d-1} $ is the $d-1$-skeleton of $X$), and proving that there are finitely many homotopy types of maps from any $d$-dimensional cell of $X$ to $Y$.
I don't have any idea how to continue. Is there a good way to think of it? Is there another way?
 A: Here is a comment from the author of the book you mention. I thought it might be relevant, however too long for a comment.

The argument I had in mind was induction on the number of cells of X, but not explicitly using a cofiber sequence.  Suppose X is obtained from a subcomplex X' by attaching an n-cell.  Given a map f : X  ---> Y, induction implies that f is homotopic to a map whose restriction to X' is one of a finite number of possible maps g_1, … ,g_k : X' ---> Y.  It suffices to show that for each g_i there are only finitely many possible extensions f : X ---> Y, up to homotopy.  Fix one such extension f_0, and let f be any other extension.  The compositions of f_0 and f with a characteristic map for the n-cell give maps D^n ---> Y that agree on S^{n-1}, so they give a "difference" map d(f,f_0) : S^n ---> Y.  We will use the following elementary fact:
Lemma:  Suppose we are given two basepoint-preserving maps from S^n to a space Z that agree on a disk D^n containing the basepoint.  Then if the two maps define the same element of pi_n(Z), they are homotopic by a homotopy that stays fixed on D^n.
Thus if pi_n(Y) is finite, there are only finitely many choices for f, up to homotopy fixing X'.
Allen Hatcher

He wrote this email as response to a friend of mine who contacted him after we had doubts solving this exercise.
A: Here is a different approach toward this problem, using the following fact:

Let $ X $ be finite dimensional CW-complex with $ d = $dim$X $. Assume $ X $ has only one base-point $ x_0 $ (i.e. $ x_0 $ is the only zero-cell). Then $ X $ is homotopy-equivalent to a reduced cone $ C(g) $ for some map $ g:\bigvee_{I} S^{d-1} \to X^{d-1} $, where $ I $ is some finite index-set.
We define the reduced cone $ C(g) $ to be the following quotient space:
$ (\bigvee_{I} S^{d-1}) \times [0,1] \sqcup X^{d-1} $ where we identifying the image of $ g $ in $ X^{d-1} $ with the end of the cylinder (i.e. $ (a,1) \thicksim g(a) $), and collapsing the middle of the cylinder and the top of it to the base-point (i.e. $ (a,0) \thicksim (x_0,0) \thicksim (x_0,t) $ for every $ t \in [0,1] $).

From now it's quite simple to conclude the finiteness of $ [X,Y] $ by induction hypothesis that $ [X^{d-1}, Y] $ is finite, since every map $ f \in [X,Y] $ up to homotopy $ X \cong C(g) $ is gluing of two maps, one is in the finite set $ [X^{d-1},Y] $ and the other is in the finite set $ \bigcup_{I}\pi_{d-1}\left(Y\right) $.
