#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n;
    scanf("%d", &n);
    vector<int> v(n);
    int mz = 0, lz = 0, z = 0;
    for (int i = 0; i < n; i++) {
      scanf("%d", &v[i]);
      if (v[i] < 0)
        lz += v[i];
      else if (v[i] > 0)
        mz += v[i];
      else
        z++;
    }
    int ans = 0;
    ans += z;
    lz += z;
    if (lz + mz == 0) ans++;
    printf("%d\n", ans);
  }
}
