What is the source of the prohibition of counting Jews? What are the details of this prohibition and what are the reasons for it?
The prohibition is cited in Yoma 22b based on Hosea 2, 1. Rambam refers to it in Hilchot Tmidin 4,4. Because the Israeli government periodically has a census the issue has been addressed by modern poskim extensively- see for example Mishptei Uziel 4, 2.