Hashem instructs Moshe to take a census of the people in the wilderness to see how big an army he can muster. He is not to count everyone. Anyone who was ready to enlist in the army had to bring proof of his heritage. He had to bring evidence of לְמִשְׁפְּחֹתָם לְבֵית אֲבֹתָם, “…according to their families of their paternal household…”. (Num. 1,2)
The Midrash Rabbah emphasizes that this points out to them that they must remember they are descendants of the Patriarchs. The idea is that when a Jew goes into battle he must not go just to kill. He must be ever mindful of his responsibility to live up to the moral standards of our Patriarchs.
It is interesting that every time Israel has been forced to go to war to defend our country the world keeps harping on atrocities that our soldiers commit. The truth is that no other army in the world fights with the high moral standards of the Israel Defense Forces. You never hear a word of criticism when other countries commit the worst cruelties and brutalities in fighting. In World War II civilians were bombed and no one thought it was wrong. Only Israel, who warns the people before bombing civilian areas where arms have been amassed, is singled out although its soldiers are trained in upholding moral standards in battle.
When Moshe was to enlist the men into the army he was to make sure that the men were moral and would uphold the ideals they were handed down by their families from generation to generation.