title: Count things with a dictonary without permanently check for existance?
body: <p>Today I use code like this to count things:</p>
  <pre><code>Dictionary&lt;string,int&gt; wordCount = new Dictionary&lt;string,int&gt;();
  if (!wordCount.ContainsKey(word))
  {
      wordCount.Add(word, 0);
  }
  wordCount[word]++;
  </code></pre>
  <p>Is there a more elegant way to count things without permanently check existence?</p>
  <p>I would like to do something like:</p>
  <pre><code>Dictionary&lt;string,int&gt; wordCount = new Dictionary&lt;string,int&gt;();
  wordCount[word]++;
  </code></pre>
  <p>And values for the new key should automatically be initialized with a default value (0 for int for example).</p>
  <p>Is there an elegant way to have this?</p>
  <p>Thanks in advance.</p>