title: Office 365 REST API /$count filter giving wrong data
body: <p>I'm trying to get count of records for different objects. The response of /$count filtered APIs is inconsistently giving wrong response.
  I am referring <a href="https://msdn.microsoft.com/en-us/office/office365/api/complex-types-for-mail-contacts-calendar#Count" rel="nofollow noreferrer">this</a> documentation link for usage instructions.</p>
  
  <p>Request URL: GET <a href="https://outlook.office.com/api/v2.0/me/Events/" rel="nofollow noreferrer">https://outlook.office.com/api/v2.0/me/Events/</a>$count</p>
  
  <p>Response: -1</p>
  
  <p>To verify if the above mentioned response is legitimate, I tried to get all events with a skip filter to identify the actual number of records present.
  After a certain attempts following request URL gave me final count:</p>
  
  <p>Request URL: GET <a href="https://outlook.office.com/api/v2.0/me/events/" rel="nofollow noreferrer">https://outlook.office.com/api/v2.0/me/events/</a>?$skip=159</p>
  
  <pre><code>Response:
  { 
  "@odata.context": "https://outlook.office.com/api/v2.0/$metadata#Me/Events",
  "value": [
      {
          "Id": "AAMkADMzYzIxNTBjLWUyMWUtNDgzYi04NTEwLTc5YTkzMWI5MmE4MgBGAAAAAABjOnbtK9ZkTIjwInd5bfYcBwDe_ScfFfAUQaKHRwnzV1lBAAAAAAENAADe_ScfFfAUQaKHRwnzV1lBAACs2ojfAAA=",
          "CreatedDateTime": "2016-11-28T11:09:03.8359488Z",
          "LastModifiedDateTime": "2017-02-21T08:04:48.8262751Z"
      }
  ]
  </code></pre>
  
  <p>}</p>
  
  <p>This implies that after skipping 159 records, I've 160th record present in the authenticated account but $count filtered API doesn't give me a valid response. </p>
  
  <p>I tried testing this scenario with two different accounts where I noticed this anomaly for /message API as well. The HTTP GET call to messages/$count gives me 1563 whereas after trying with skip filter I found the total count to be 1396</p>
  
  <p>I want to know if $count  returns a legitimate response? If yes then explain this anomaly If no then is there any pattern where we should expect response to inconsistent?</p>