He appears to be using the built-in gallery function, but I have been scouring the internet and cannot find any way to do this. Any help would be appreciated. Thanks!

EDIT: It should also be noted that in this particular case I actually don't need the standard captions to show at all. Instead of adding the comment-count to the caption, I would be happy with a way to replace the standard caption with the comment count. I'm not sure if this make things any easier. Thanks!

Thanks for the great information! I'll have to dig into this a little further as it seems a little over my head. Hopefully I can figure it out.
–
user2738Jan 26 '11 at 20:23

If you're happy you've been given the necessary information to answer the original question please consider marking the appropriate answer as correct. If you feel the question was not sufficiently answered please let us know.
–
t31osFeb 24 '11 at 17:23

And remember that you want the comments on the attachment, not on the main post. get_comments_number() accepts a $post_id parameter, that's where you pass the attachment id.
–
Jan FabryJan 26 '11 at 9:08