Actually its fairly simple. typedef enum {val1=0,val2,val3,val4,val5,VALUE_COUNT} values; VALUE_COUNT will equal 5 and as long as you don't change the sequental ordering or move VALUE_COUNT from the end of the list. Brian