Determining total blocks solved
To determine the current blockheight of any coin, you will need to pull data from the network itself. The source code that runs a node for any coin will not include this information. 

A full node will download the blockchain history, so your node could then report the current blockheight back to you. The source code basically contains instructions telling your computer how to do this, but the explicit block height is not contained within the source code.