title: Firebase: Get hourly/daily/monthly count
body: <p>I'm new to Firebase and coming from MySQL. I'm not able to wrap my head around this, which is trivial in case of MySQL. I'd like to retrieve number of records (in this case — visits) on either hourly, daily or monthly interval. Each visit is recorded in Firebase as follows (I may have got this wrong as well).</p>
  
  <pre><code>{
      "visit": {
        "timestamp": 1414622353610,
        "user": "198"
      },
      "visit": {
        "timestamp": 1414622353680,
        "user": "55"
      },
      "visit": {
        "timestamp": 1414622353710,
        "user": "60"
      }
  }   
  </code></pre>
  
  <p>How would I go about implementing this in Firebase. I don't find any relevant query methods for the same in the Firebase docs. I'm working with Firebase REST API, so an example using REST would be more helpful.</p>