Using your above code:, you were just missing the WHERE clause. Hopefully that should work.
<?php
global $wpdb;
$images = intval( $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->nggpictures WHERE galleryid = {$gallery->ID}") ); ?>
<a rel="prettyPhoto" href="<?php echo $image->imageURL ?>" <?php $image->thumbcode ?>>
<span>view</span>
</a>
<?php echo $images; ?> pictures
It's not the best way to implement it, but if it works for you :)