title: Table View Number of Rows Function Not returning array items count correctly?
body: <p>I am adding a bunch of data into any array like this:</p>
  
  <pre><code>for (index, location) in locations.enumerate() {
  
      FIRDatabase.database().reference().child("users").child(location.key as! String).observeEventType(.ChildAdded, withBlock: { (snapshot: FIRDataSnapshot) in
          if(snapshot.exists()){
              print(snapshot)
              if let dictionary = snapshot.value  as? [String: AnyObject] {
                  let user = User()
                  user.id = snapshot.key
                  user.setValuesForKeysWithDictionary(dictionary)
  
                  self.users.append(user)
  
                  print(user)
  
                  dispatch_async(dispatch_get_main_queue(), {
                      self.tableView.reloadData()
                  })
  
              }
          }
      }, withCancelBlock: nil)
  }
  </code></pre>
  
  <p>All of this data is being added into an array called <code>users</code>. I then return <code>users.count</code> like this:</p>
  
  <pre><code>override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      return users.count
  }
  </code></pre>
  
  <p>For some random reason though whenever my data appends to the array of users, the number of rows function stops being called. </p>
  
  <p>This picture is some print output stuff. It shows you the the count of the items in the array and how it stops right when all the data of the users is appended:</p>
  
  <p><a href="https://i.stack.imgur.com/OdETO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OdETO.png" alt="image"></a></p>
  
  <p>Does anyone know why this may be happening?
  Any help would be appreciated!</p>