title: typedef enum, assiging a value within
body: <p>compiling with gcc C99</p>
  
  <p>I have been using enums for a while now. However, I am using some sample code to develop my application. And I came across some code like this. I have been informed this is the best practice use when using enums. But I don't see how this has any advantages.</p>
  
  <pre><code>typedef enum {
      TYPE_DATE,
      TYPE_TIME,
      TYPE_MONEY,
  
      TYPE_COUNT,
      TYPE_UNKNOWN = TYPE_COUNT
  } string_type_e;
  </code></pre>
  
  <p>Why have the <code>TYPE_COUNT</code> and why assign <code>TYPE_COUNT</code> to <code>TYPE_UNKNOWN</code>?</p>
  
  <p>Many thanks for any suggestions,</p>