I'm looking for a 'simple' path-connected space $X$ such that for some homotopy group $\pi_n(X)$ there are fewer free homotopy classes $[S^n,X]$ than elements of $\pi_n(X)$.
From this question we know that no such example can exist for $n=1$. EDIT: this is false! Thanks to Moishe Cohen. Ideally I would like an example for $n=2$.
Thanks for the help.