#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int x[200], y[200];
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i];
  int k = 0;
  for (int i = 0; i < n; i++) {
    bool u = 0, d = 0, l = 0, r = 0;
    for (int j = 0; j < n; j++) {
      if (x[j] > x[i] && y[j] == y[i]) r = 1;
      if (x[j] < x[i] && y[j] == y[i]) l = 1;
      if (y[j] > y[i] && x[j] == x[i]) u = 1;
      if (y[j] < y[i] && x[j] == x[i]) d = 1;
    }
    if (u && d && l && r) k++;
  }
  cout << k;
  return 0;
}
