Let $X$ and $Y$ be topological spaces and let $[X,Y]$ be the set of homotopy classes of continuous maps from $X$ to $Y$. Is there some useful description of this set of homotopy classes based on homology, cohomology, homotopy, cohomotopy groups of $X$ and $Y$?
I assume it heavily depends on the type of spaces $X$ and $Y$ one considers. Say I am mostly interested when $Y$ is some compact Lie group ($U(n)$) and $X$ is in principle any compact metric space (if something better can be said for a particular class of compact spaces $X$, I am of course interested). I should also say that by `description', I mean mostly the cardinality (finite, infinite), but whatever can be said is potentially interesting for me.
In some sense, the best approximation to $[X, Y]$ for general spaces $X$ and $Y$ by some (co)homological invariant $h$ is given by something like the (unstable) Adams spectral sequence. Even though the differentials in such a spectral sequence can be hard to compute, the $E_2$ page of the spectral sequence is just homological algebra involving $h(X)$ and $h(Y)$ (which is not to say it can't still be complicated, but at least it can often be done algorithmically in a range). Moreover, from how the spectral sequence is set up, the things on the $E_2$-page will provide an upper bound for the cardinality of $[X, Y]$.
A perhaps less technical alternative would be to use the Atiyah-Hirzebruch spectral sequence for $[-, Y]$, i.e., obstruction theory. The idea is to build up a map $X \to Y$ by inducting along the skeleta of $X$ or equivalently by resolving $Y$ in terms of its Postnikov tower. If I recall correctly, the group of lifts at each stage is parametrized by something like $H^n(X; \pi_n Y)$; again these groups would give an upper bound for $[X, Y]$.
These are some pretty powerful, general methods. But note that often there are easier solutions in particular cases of interest.