title: How to increment a value in a map with Apex?
body: <p>Is there a way to increment a value in a map without needing a second variable?</p>
  
  <p>for example, this doesn't work:</p>
  
  <pre><code>counts = new Map&lt;string,integer&gt;();
  counts.put('month_total',0);
  counts.put('month_total',counts.get['month_total']++);
  </code></pre>
  
  <p>it returns "Initial term of field expression must be a concrete SObject: MAP"</p>
  
  <p>instead I needed to do:</p>
  
  <pre><code>counts = new Map&lt;string,integer&gt;();
  counts.put('month_total',0);
  integer temp = 0;
  temp++;
  counts.put('month_total',temp);
  </code></pre>
  
  <p>is there any way to increment without needing an extra variable?</p>