You can reverse the number from the serial numbered cards. For example, to keep it simple, say only hobby boxes are sold. Within this group, there is a set of 50 cards, each numbered to 100 and say are inserted with pack odds 1:1000. For this hobby box, say there are 25 packs per box.
Then the math goes like this: 50 cards * 100 repeats = 5000 cards for the group.
Each card has 999 packs made for the one it is in, so 1000 packs * 5000 cards = 5000000 packs made.
Now, 25 packs per box means there are 5,000,000 / 25 = 20,000 boxes made.
The challenge in real life is that there are HTA, Hobby, Blaster, Rack, Target Bin, Wal-Mart bin and possibly other types. But they all have odds listed on them. I actually look at the odds and make sure the odds per card (break it down from pack to number of cards within the pack) remains the same between the different types of boxes. Sadly, it's not.