The Israelite people were counted several times in the wilderness. According to the Sages, this was done because they are greatly beloved in the eyes of God, who therefore repeatedly counted them.
Come and see how beloved the Israelites are before the Omnipresent. As the Holy One, Blessed be He, wrote the number of the Israelites four times in the encampment and travels of each tribe in its grouping: twice writing the total of each individual tribe and twice writing the tally of all the tribes together. In addition, He counted for each and every grouping the total of each individual tribe and the total of each grouping. This is to inform you how beloved the Israelites are before Him, as they are His multitude and He wishes to count them all the time. This is like a person who has merchandise that is very precious to him, who counts it and counts it again, many times, so that he will know its tally and he will rejoice over it for each and every tally. Likewise, the Holy One, Blessed be He, rejoiced at the mention of the tally of the Israelites, saying: Such a great multitude I have in My world who perform My will, and He takes solace in them. (BemidbarRabba 2)