Handle GET /blockchains/:blockchainID/subdomains_count
        Takes `all=true` to include expired names
        Reply with the number of names on this blockchain

def GET_blockchain_num_subdomains( self, path_info, blockchain_name ):
        """
        Handle GET /blockchains/:blockchainID/subdomains_count
        Takes `all=true` to include expired names
        Reply with the number of names on this blockchain
        """
        if blockchain_name != 'bitcoin':
            # not supported
            self._reply_json({'error': 'Unsupported blockchain'}, status_code=404)
            return

        blockstackd_url = get_blockstackd_url()
        num_names = blockstackd_client.get_num_subdomains(hostport=blockstackd_url)
        if json_is_error(num_names):
            if json_is_exception(num_names):
                status_code = 406
            else:
                status_code = 404

            self._reply_json({'error': num_names['error']}, status_code=status_code)
            return

        self._reply_json({'names_count': num_names})
        return