When are maps between topological spaces homotopic? I wanted to ask if there is any known mehod to quantify 'how many' homotopy classes of maps there are between two given topological spaces $X$, $Y$ (CW-complexes, say).
So far I had the following idea:
If two maps $f,g:X\rightarrow Y$ are homotopic, then they induce the same maps on all homotopy groups. Maybe there's a class of spaces for which the converse is also true. Then I would have a characterization via Homomorphisms between homotopy groups.
Does anybody know if there is a class of spaces for which this is true?
 A: How about Eilenberg--Mac Lane spaces?
Let $G$ and $H$ be any groups. For pointed homotopy classes, $\langle K(G,1), K(H,1)\rangle $ is $\operatorname{Hom}(G,H)$, and for unpointed homotopy classes $[K(G,1), K(H,1)]$ is $\operatorname{Hom}(G,H)/H$, the orbits under conjugation by $H$.
When $n>1$ and $G$ and $H$ are abelian, we have $$\langle K(G,n),K(H,n)\rangle = [K(G,n), K(H,n)]=\operatorname{Hom}(G,H),$$
as pointed out by András in the comments.
Eilenberg--Mac Lane spaces also give counter-examples to the conjecture that maps $f,g:X\to Y$ between CW complexes are homotopic if they induce the same maps on homotopy groups. See my answer here.
A: Vidit's comments are  relevant to a paper of Graham Ellis 
Homotopy classification the J.H.C. Whitehead way.
Exposition. Math. {6} (1988) 97--110. 
The more general result given here is that if $C$ is a crossed complex and $X$ is a CW-complex then there is a bijection of homotopy classes
$$[X,BC] \cong [\Pi X_*, C]$$ 
where $BC$ is the classifying space of the crossed complex, and $\Pi X_*$ is the fundamental crossed complex of the skeletal filtration of $X$. A cubical version of the proof is given in the EMS Tract Vol 15 Nonabelian Algebraic topology: filtered spaces, crossed complexes, cubical homotopy groupoids, where a pdf is available. This book also contains our generalisation of the work in CHII on the relation between crossed complexes and chain complexes with a group of operators. He writes in essence that the former have better realisation properties, and the latter are better for calculation. 
Note that the construction $BC$ generalises Eilenberg-Mac Lane spaces, including the local system case. 
This has been generalised to the equivariant case, 
Brown, R., Golasinski, M., Porter, T. and Tonks, A.
Spaces of maps into classifying spaces for equivariant
  crossed complexes. II. The general topological group case.
$K$-Theory 23 (2001) 129--155. arxiv 9808111
There is a lot in Whitehead's CHII  ! One example is his result on free crossed modules. I wrote up his proof ([30] in my publication list) and the referee wrote that: "The theorem is not new, the proof is not new, and the paper should be published." This theorem is sometimes stated in texts on algebraic topology but rarely proved. Note that Whitehead's "homotopy systems" are our "reduced  free crossed complexes". 
To go back to the original question, it must be said that the homotopy groups are but a pale shadow of the homotopy type, and indeed crossed complexes give only a "linear" perspective, though linear methods are often useful as an approximation. 
The fist displayed equivalence is part of a weak equivalence 
$$ B(CRS(\Pi X_*, C )) \to (BC) ^X$$
which does give information on homotopies in this case. See the above mentioned book, Theorem 11.4.19. 
A: Mark Grant's answer provides a good class of examples, but a slightly more general class can be found after (many, many hours) of reading Whitehead's "Combinatorial Homotopy II" available here. 
I think the content of the Corollary right after Theorem 6 (on page 468 of the linked document) is as follows after one unzips the notation:
If $X$ and $Y$ are connected CW complexes with $\dim X$ smaller than $n$ and all homotopy groups $\pi_kY$ trivial for $k$ between $2$ and $n-1$, then the homotopy classes of maps $[X,Y]$ correspond bijectively to $\pi_1Y$-equivariant chain homotopy classes $[C(X'),C(Y')]_{\pi_1Y}$ where $X'$ and $Y'$ are the universal covers of $X$ and $Y$ respectively. From this point onwards, the problem reduces to linear algebra (although I'm not claiming that this algebra is algorithmically tractable in general). 
I hope someone who can actually read Whiteheadese will confirm that I have not screwed this up.
