Count the number of a post types associated with another post type

Sounds like you need to use WP_Query or something similar.

<?php
// First query: get all destinations
$args = array(
    'post_type' => 'destination',
    'posts_per_page' => -1,
    'no_found_rows' => 'true' // skips pagination
);
$destinations = new WP_Query($args);
// Now for every destination:
foreach($destinations as $destination) {
    // Second query to get tours
    $secondargs = array(
        'post_type' => 'tour',
        'posts_per_page' => -1,
        'no_found_rows' => 'true', // skip pagination
        'meta_query' => array(
            array('key' => 'yourmetakey',
                'value' => "$destination", // only get tours with current destination
                'compare' => '=',
            ),
        ),
    );
    $tours = new WP_Query($secondargs);
    // output the name of the destination plus the number of tours
    echo $destination->title . '(' . count($tours) . ')';
}
?>

The first query grabs all destinations. The second query will need to be tweaked – however you’ve associated the destinations to the tours, use that postmeta or taxonomy to only grab the tours for each individual destination. At the end, you’ll probably want to customize the html output – maybe a <ul> or something similar, probably linking to the destination.

error code: 523