There is a ready function for doing such action:
Take a look here: https://codex.wordpress.org/Function_Reference/wp_count_comments
This should really sole your problem as you can use an if statement deciding the picture, just remember you have to use the post_id in order to get the count.
Thank you!