added comments to CalculateCoinCounts