title: Android - how to count markers in GoogleMap APIv2
body: <p>I want when I set more than two markers they to disappear.</p>
  
  <p>I wrote this code but it seems is not working.</p>
  
  <p>Thanks  in advance.</p>
  
  <pre><code>MarkerOptions markerOptions = new MarkerOptions();
              markerOptions.position(latLng);
              markerOptions.title(addressText);
  
              map.addMarker(markerOptions);
  
   List&lt;MarkerOptions&gt; aList = new ArrayList&lt;MarkerOptions&gt;();
              aList.add(markerOptions);
  
              int p;
  
              for(p = 0; p&lt;aList.size(); p++){
  
              }
  
              if(p&gt;2){
  
                  map.clear();
              }
  </code></pre>