Hi @sonny12,
@bcworkz is right here you will have to pass meta_value to get posts by meta_key.
you could do it with meta_query we have in wp_query.
try this code and if it works let me know.
$args = array(
'post_type' => 'product',
'post_per_page' => -1,
'meta_query' => array(
array(
'key' => 'product_family',
'value' => array( 'latest',
'car_navigation',
'thired_one'),
'compare' => 'IN',
),
),
);
$query = new WP_Query($args);
$count = $query->post_count;
echo '<p>' . $count . '</p>';