This works:
$images = get_children( array(
'post_parent' => $post->ID,
'post_type' => 'attachment',
'post_mime_type' => 'image',
'orderby' => 'menu_order',
'order' => 'ASC',
'numberposts' => 999
));
if ( $images ) {
$total_images = count( $images );
}
The variable $total_images will hold the count of images in your gallery.