#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a1[222], a2[222], ans = 0;
  int a, b, c, d;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a1[i] >> a2[i];
  }
  for (int i = 0; i < n; i++) {
    a = 0, b = 0, c = 0, d = 0;
    for (int j = 0; j < n; j++) {
      if (a1[i] > a1[j] && a2[i] == a2[j]) a = 1;
      if (a1[i] < a1[j] && a2[i] == a2[j]) b = 1;
      if (a1[i] == a1[j] && a2[i] > a2[j]) c = 1;
      if (a1[i] == a1[j] && a2[i] < a2[j]) d = 1;
    }
    if (a == 1 && b == 1 && c == 1 && d == 1) ans++;
  }
  cout << ans << endl;
  return 0;
}
