I'm trying to figure out how to count and display the number of images in a gallery with WP 3.5. I was following an old post on Ottopress, querying the DB for attachments but it seems the galleries are now contained in shortcodes.
Is it possible to extract the shortcode from the post and count the IDs? What is the best way to accomplish this?