Hatcher Exercise (4.1.20) I'm having a little trouble doing exercise $4.1.20$ at page $359$ of Hatcher.  It states: 

Show that $[X,Y]$ is finite if $X$ is a finite connected CW complex and $\pi_i(Y)$ is finite for $i \leq \text{dim }X$", where by $[X,Y]$ we mean the homotopy classes of maps from $X$ to $Y$.  

I'm guessing the idea is to induct on the cells of $X$.  So starting from some $X$ for which it is true and attaching an $e_k$ to get $X'$, all maps $f:X'\rightarrow Y$ can be subdivided into the equivalence classes of the induced map on $X\subset X'$, which are finite.  Taking two maps $f,g$ from the same class, we can homotope $g\mid_X$ to $f\mid_X$ and extend that to all of $g$.  In particular the characteristic maps on $\partial D^k$ agree.  So it seems I need to relate the finite number of $(S^k,x_0)$ homotopy types to possible map types of $D^k$ with fixed $\partial D^k$.  Most things I try seem to necessitate the extension of some homotopy of $\partial D^{k}$ to $X$, but I don't think that has the extension property in general?
 A: You can solve by induction and the Puppe sequence. I'm adding my answer:
we will prove by induction on the number of cell (in any dimension) of $X$.
If $X$ has only one cell then $X=*$ and then $\left[*,Y\right]=\pi_0(Y)$ which is finite (becuase $0\leq\dim X=0$).
Now lets assume we have a $n$-dimensional CW-complex, noted $X$, that comes from attaching a $d$-dimensional cell to $\tilde{X}$ ($d<n$) to a $k$-dimensional CW-complex ($k<n$), and we know that $\pi_{i}(Y)$ is finite for $i\leq n$. So by induction assumption we know that $\left[\tilde{X},Y\right]$ is finite, and by definition $X=C(f)$ for the attaching map $f:\mathbb{S}^{d-1}\rightarrow\tilde{X}$. so we know we have the long exact sequence:
$$
\left[\Sigma\mathbb{S}^{d-1}=\mathbb{S}^d,Y\right]=\pi_d(Y)\rightarrow\left[C(f)=X,Y\right]\rightarrow\left[\tilde{X},Y\right]\rightarrow\left[\mathbb{S}^{d-1},Y\right]=\pi_{d-1}(Y)
$$
now because $\left[\tilde{X},Y\right]$ is finite, we have finite number of fibers in $\left[X,Y\right]$ we also know that $\left[\mathbb{S}^{d},Y\right]$ acts on every fiber transitivley, and we know that every element of $\left[X,Y\right]$ has a trivial stabilizer. So we can say that $\mid\left[X,Y\right]\mid=\mid\pi_d(Y)\mid\cdot\mid fiber\left(\left[X,Y\right]\rightarrow\left[\tilde{X},Y\right]\right)\mid$ so it is also finite.
My answer assume you know the property of Puppe sequence.
