Homotopy idempotent maps over a finite product of spheres

Let $$X$$ be a topological space. A continuous map $$h:X\longrightarrow X$$ is called homotopy idempotent if $$h\circ h\simeq h$$.

My question is:

What is the number of homotopy classes of homotopy idempotent maps $$h:\prod_{n\in I}(\prod_{i_n}\mathbb{S}^n ) \longrightarrow \prod_{n\in I}(\prod_{i_n}\mathbb{S}^n )$$, where $$i_n$$ denotes the number of copies of $$\mathbb{S}^n$$ (a finite product of spheres of the same or different dimensions), where $$I$$ is a finite subset of $$\mathbb{N}$$?

• Minor terminology question: should we consider multisets $I$, so that there can be more than one sphere in each dimension? – Joshua Mundinger Jun 16 '18 at 9:57
• @JoshuaMundinger Your are right. I think it is better to write $\prod_{n\in I}(\prod_{i_n} \mathbb{S}^n)$, where $i_n$ denotes the number of copies of $\mathbb{S}^n$. – M.Ramana Jun 16 '18 at 12:32

A special case which is tractable (at least for me) is a self-map of the $n$-torus $f: (S^1)^n \to (S^1)^n$. Because the $n$-torus has contractible universal cover which is a group, any two endomorphisms of the $n$-torus which agree on $\pi_1$ are homotopic (their difference lifts to $\mathbb{R}^n$ and hence is nullhomotopic). Hence the homotopy endomorphisms of the $n$-torus (which have a group structure from the torus, making them into a ring with composition) are isomorphic as a ring to the ring of $n\times n$ integer matrices. There are infinitely many idempotent $n\times n$ integer matrices for $n>1$.