${\rm{log}}_2(1+p_1h_1)+{\rm{log}}_2(1+p_2h_2)+\cdots+{\rm{log}}_2(1+p_Nh_N)=NX$
Here $X$ and $h$ are known, but $N$ is an unknown value
I want to find the value of $N$
Please note that $p_1=p_2=\cdots=p_N$ and $p_1+p_2+\cdots+p_N=Y$, $Y$ is also known.
And $h_1=h_2=\cdots=h_N$
When $p_1=p_2=\cdots=p_N=p$ and $h_1=h_2=\cdots =h_N=h$, the first equation simplifies to $N\log_2(1+ph)=NX$, or just $\log_2(1+ph)=X$, and the relation with $Y$ becomes $Np=Y$, or $p=Y/N$. Exponentiating both sides to get rid of the logarithm and substituting $Y/N$ for $p$ gives
$$1+{hY\over N}=2^X$$
which solves to
$$N={hY\over2^X-1}$$
One should note that the problem set-up implies that $N$ is a positive integer, so $h$, $Y$, and $X$ cannot be arbitrary real numbers for the solution to make sense.