The Torah first hints at the problem with counting Jews directly already before Mattan Torah: "When you take the sum of the children of Israel according to their counting, then each man will give atonement for his soul when you count them; then there will be no plague as you count them." (Shemot 30:12.)
The gemara learns that this is a general prohibition from the actions of King Shaul, who counted the people in "betelaim". (I Shemuel 15:4.) The simple understanding of this phrase is "in Telaim", a particular place (Radak), but Chazal understood the phrase literally, "by lambs": Shaul counted one lamb for each man instead of counting the men directly.
Furthermore, Hoshea's prophecy "And the children of Israel shall be as the sand of the sea, which will be neither measured nor counted" (Hoshea 2:1) is understood not merely as a blessing, but also as a prohibition. (Yoma 22b.) And even counting indirectly is permitted only for the purpose of a mitzvah. For no purpose at all, counting is forbidden, and for this reason David was punished for arranging a census merely "so that I may know the number of the people" (Shemuel II 24:2) - although he had not been punished for numbering his soldiers, which is necessary for making war. (II Shemuel 18:1.)
This idea makes its way into everyday halakha in the prohibition of counting men for a minyan. (Pri Chadash OC 55, KSA 15:3.) This prohibition emphasizes the uniqueness of each human being. A person's unique qualities can never be reduced to some numerical quantity. So two human beings is not in any meaningful sense "twice as much" as one. Reuven plus Shimon do not "sum together" to equal two, rather they remain the same Reuven and Shimon as before.
There is a bit of a paradox involved, because ultimately we are interested in the number of people. No matter how unique each individual is, it takes a certain number of men to man a tank, and ten adult Jewish men constitute a minyan. Counting people directly fails to take account of each person's uniqueness; refraining altogether from counting fails to acknowledge the importance of sheer numbers. The indirect counting which we affirm for a mitzva perfectly balances the two aspects.
The most common way of calculating a minyan is to count according to the words in a Scriptural verse (usually Tehillim 28:9). This is a very beautiful way, because each word in a sentence is unique and without it the sentence would lose its meaning.