title: How to use a value outside dataSnapshot function?
body: <p>In the code below i get the number of children but i want to use it outside the onDataChange method.</p>
  
  <pre><code>              mRef.addValueEventListener(new ValueEventListener() {
                      @Override
                      public void onDataChange(DataSnapshot dataSnapshot)
                      {
                          DateStorage dateStorage = null;
                          for (DataSnapshot result : dataSnapshot.getChildren()) 
                      {
  
  
                       Log.e(result.getKey(),result.getChildrenCount() + "");
                        in[0] = result.getChildrenCount();
  
                          }
  
                      }
  
                      @Override
                      public void onCancelled(DatabaseError databaseError) {
  
                      }
                  });
  </code></pre>
  
  <p>Can anyone help me?</p>