title: ListView's getCount() always returns 0
body: <p>I'm using <code>ParseQueryAdapter</code> to display a <code>ListView</code> including the set of elements given by the Parse query:</p>
  
  <pre><code>ParseQueryAdapter.QueryFactory&lt;AlertObject&gt; factory =
          new ParseQueryAdapter.QueryFactory&lt;AlertObject&gt;() {
              public ParseQuery&lt;AlertObject&gt; create() {
                  ParseQuery&lt;AlertObject&gt; query = AlertObject.getQuery();
                  query.orderByDescending(AlertObject.TIMESTAMP_KEY);
                  query.fromLocalDatastore();
                  return query;
              }
          };
  
  alertsListAdapter = new AlertListItemAdapter(activity, factory, thisFragment);
  ListView alertsListView = (ListView) rootView.findViewById(R.id.alerts_list_view);
  alertsListView.setAdapter(alertsListAdapter);
  </code></pre>
  
  <p>Now, I'd like to know the number of items in the <code>ListView</code>, but if I call <code>alertsListView.getCount()</code>, it returns <code>0</code>. What am I doing wrong?</p>
  
  <p><strong>EDIT</strong>: someone gave this post a negative vote, but without leaving a comment or a request for clarification. So, I ask for some explanation about the reason of that in order to improve the readability of my question.</p>
  
  <p><strong>UPDATE</strong>: below my adapter</p>
  
  <pre><code>public class AlertListItemAdapter extends ParseQueryAdapter&lt;AlertObject&gt; {
  
      private Context context;
      private Fragment listAlertsFragment;
  
      public AlertListItemAdapter(Context context,
                                  ParseQueryAdapter.QueryFactory&lt;AlertObject&gt; queryFactory,
                                  Fragment fragment) {
          super(context, queryFactory);
          this.context = context;
          this.listAlertsFragment = fragment;
      }
  
      @Override
      public View getItemView(final AlertObject alertObject, View view, final ViewGroup parent) {
          [...]
      }
  
      @Override
      public int getCount() {
          return super.getCount();
      }
  }
  </code></pre>