#include <bits/stdc++.h>
using namespace std;
int a[222], b[222];
int main() {
  int n, ans = 0;
  cin >> n;
  int p, q, r, s;
  for (int i = 0; i < n; i++) cin >> a[i] >> b[i];
  for (int i = 0; i < n; i++) {
    p = q = r = s = 0;
    for (int j = 0; j < n; j++) {
      if (j == i) continue;
      if (a[j] > a[i] && b[j] == b[i]) p++;
      if (a[j] < a[i] && b[j] == b[i]) q++;
      if (a[j] == a[i] && b[j] > b[i]) r++;
      if (a[j] == a[i] && b[j] < b[i]) s++;
    }
    if (p && q && r && s) ans++;
  }
  cout << ans;
  return 0;
}
