Count custom post type based on two meta data

$args = array(
    'post_type'  => 'appointments',
    'meta_query' => array(
        'relationship' => 'AND',
        array(
            'key'   => 'location',
            'value' => $place //set this somewhere
        ),
        array(
            'key'   => 'timestamp',
            'value' => $time //set this somewhere
        )
    )
);
$posts = new WP_Query( $args );

Docs: WP_Query

You have the flexibility to add just about anything else you need to that, for example, post_status.