Fixed the calls to count_num_instances() in the select() function.
Authored by: bugman 2008-04-15
Parent: [r5730]
Child: [r5732]