class OfflineQueryController extends AbstractQueryController {

  @Override
  public <T extends ParseObject> Task<Integer> countAsync(
      ParseQuery.State<T> state,
      ParseUser user,
      Task<Void> cancellationToken) {
    if (state.isFromLocalDatastore()) {
      return offlineStore.countFromPinAsync(state.pinName(), state, user);
    } else {
      return networkController.countAsync(state, user, cancellationToken);
    }
  }

  public  OfflineQueryController(OfflineStore store, ParseQueryController network);

}