Display a number value from mysql query in WP

Your easiest route to this is probably shortcodes, which effectively allow you to insert the output from a bit of PHP code in a post or page.

For example, this would create the shortcode [countpeople] which you could pop in any post and it would render the value from the SQL statement using a $wpdb helper function:

function my_plugin_name_count_people() {
    global $wpdb;
    return $wpdb->get_var("SELECT COUNT(*) FROM PEOPLE;");
}

add_shortcode('countpeople', 'my_plugin_name_count_people');

Read more about shortcodes here: https://codex.wordpress.org/Shortcode_API