Something like:
$image_count = substr_count( $post_array[0]['post_content'], '<img');
It won’t cover images in galleries … but you can count IDs in gallery shortcode.
Something like:
$image_count = substr_count( $post_array[0]['post_content'], '<img');
It won’t cover images in galleries … but you can count IDs in gallery shortcode.