Is there any way to find out the total supply of bitcoins with some command in the bitcoin core that really checks the whole blockchain by checking all balances of all addresses?
I ask this because the only way I see out there to get the current supply is via a formula, for example:
https://www.reddit.com/r/Bitcoin/comments/2zglql/how_to_show_money_supply_in_latest_bitcoin_core/What if there is some kind of flaw in bitcoin and some people out there are generating bitcoins out of nothing, how would we know?
Is there some place or core command that really counts all the balances from all addresses in the blockchain?
You just can't do that...
A block that "magically" contained extra outputs (other than the mining reward) would be rejected by the network.
Every transaction needs an existing input to create a new output, and since every node has the blockchain and all unspent outputs in memory/on disk, this can easily be verified.