Numbers / Bamidbar
"Take a census of the entire Israelite community according to their families, their fathers' houses, and the names of each individual male."
Take a census
Because of God’s love for the Jewish people, He commanded Moses to count them. When they fell due to the golden calf, they were counted. When the Tabernacle was established, they were counted (Rashi).
The idea of counting the Jews represents counting the King’s legions. In counting the Jews, God demonstrated how precious they were to Him. Each Jew has his own special place, and each one makes a difference. In our present exile, the number of Jews is limited and can therefore be counted. But in the Future, when impurities will be removed from the world, the number of Jews will increase beyond number (cf. Hosea 2:1). For in truth, the Jewish soul transcends time and space—it transcends number (Likutey Halakhot IV, p. 96).
We see the same idea of a “count” in the way God counted the Days of Creation. As soon as the world was created, God gave each day a number: the First Day, the Second Day, the Third Day, and so forth. Sanctity and holiness transcend time and space and cannot be numbered or counted. But in this world of impurities, God established a numerical system so that a count can be taken. Thus, one must stand to be counted and represent his good and his position. But in the Future, the Jews will be beyond numbers (ibid.).
Take a census
One is not allowed to count Jews per se. Should a census become necessary, the people are enumerated through the half-shekel that each one contributes to the Temple. Yet if it is dangerous to count Jews, why have them give shekalim? Why not forgo the count altogether?
In this case, the census was a necessary follow-up to the sin of the golden calf. Sin robs a person of the “sparks of holiness” he once possessed. After the Jews sinned, a count became necessary to identify and try to recoup what was lost, in order to elevate it back into holiness (Likutey Halakhot II, p. 105a).