Numbers 31:36

And the half, which was the portion of them that went out to war, was in number three hundred thousand and seven and thirty thousand and five hundred sheep:

The count stands inside the account of Israel's war against Midian. That campaign was commanded as judgment upon the people who had led Israel into sin. The numbering of the sheep therefore belongs to a punitive expedition, not to an ordinary census of flocks.