Why is this $wpdb query looping 5 times?

The most likely cause is that the hook is probably running multiple times (e.g. once per meta field). You may need to qualify/filter your function like so…

add_action( 'added_post_meta', function ( $mid, $object_id, $meta_key, $_meta_value) {
  global $wpdb;

  if ( $meta_key != 'data19' ) {
    return;
  }

  $table_name = $wpdb->prefix . 'postmeta';
  $results = $wpdb->get_var(
    "SELECT meta_value FROM " . $table_name . 
    " WHERE meta_key = 'data19' AND post_id = " .$object_id. " " );

}, 10, 4 );