I'm trying to get my head around the difficulty setting of Bitcoin. How can I calculate how many zeros the target string needs to start with?
17 judging by the latest blocks published on blockchain.info: https://blockchain.info/block/0000000000000000057fcc708cf0130d95e27c5819203e9f967ac56e4df598ee
Clarifying: difficulty is a more human-friendly representation of the target. Tha target itself is not specified in terms of the amount of zeroes. This seemed to be the case with hashcash.
The more precise definition of the target is a maximum accepted number for the produced block hash. In this sense a certain hash with a certain number of leading zeroes may be accepted and another hash with the same amount of leading zeroes may not be accepted.