title: select option metabox with value count
body: <p>i'm new early for wordpress and php code.</p>
  
  <p>so, i have post type property with type ( apartment, house, villa, etc ). example, for type apartment any three property. but on select option, be like this :</p>
  
  <p>--Type</p>
  
  <p>-Apartment</p>
  
  <p>-Apartment</p>
  
  <p>-Apartment.</p>
  
  <p>so, i want like this :</p>
  
  <p>--Type</p>
  
  <p>-Apartment(3)</p>
  
  <p>but, i use with count. not work for me.</p>
  
  <p>so, this my code :</p>
  
  <pre><code>$args = array(
  'post_type' =&gt; 'property',
  'posts_per_page'    =&gt; -1
  );
  $property = get_posts($args);
  </code></pre>
  
  <p>and this my code select option.</p>
  
  <pre><code>&lt;select name="type"&gt;
  &lt;option&gt;Type&lt;/option&gt;
  &lt;?php  foreach( $property as $homes ) {
  $type = get_post_meta($homes-&gt;ID, 'type', true);
  if ( $type == '---') continue;
  $new_type = count($type);
  echo '&lt;option value="'.$homes-&gt;ID.'"&gt;'.$new_type.'&lt;/option&gt;';
   } ?&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>anyone can help me? thanks in advance. regards </p>