Display an image if odd number of posts in grid

The common mistake people make in this situation is they start to introduce bunch of custom counters to keep track of state.

Really WP_Query just has those already. In your case that would be global $wp_query and $wp_query->post_count and $wp_query->current_post. That should be quite enough to figure out even/odd overall and current iteration in the loop.