title: Add Unique only to array and keep field count on update
body: <p>I store in a collection an array of item (stringId). All element in this array must be unique. So I use $addToSet to push my item.</p>
  
  <p>But, I also would like to set in the same request the size of my array in a field :</p>
  
  <pre><code>{
    unique_array: ['12', '20', '18'],
    size_of_array: 3
  }
  </code></pre>
  
  <p>=> Add to set 15</p>
  
  <pre><code>{
    unique_array: ['12', '20', '18', '15'], =&gt; Add to set
    size_of_array: 4 =&gt; Incremented
  }
  </code></pre>
  
  <p>=> Add to set 18</p>
  
  <pre><code>{
    unique_array: ['12', '20', '18', '15'], =&gt; Already in the set
    size_of_array: 4 =&gt; Not incremented
  }
  </code></pre>
  
  <p>Thanks !</p>