Each piece has a tracking device built in.
I have a built in Lego tracking device. It's called 'the sole of my bare foot!'.
When we were kids my dad once threw all our Lego in the bin because he'd walked over it in the night. My mum took pity on us and fished it out again, but kept it hidden in a plastic bag for six months before she gave us it back!
Meanwhile, back at the ranch...
How can they possibly know how much Lego there is in the world? They might know how much they've made but there is no way you can know how much of that is still available for use.