#include <bits/stdc++.h>
using namespace std;
int n;
pair<int, int> a[300];
bool supercenter(int id) {
  int x = a[id].first, y = a[id].second;
  int r = 0, l = 0, u = 0, d = 0;
  for (int i = 0; i < n; i++) {
    if (i == id)
      continue;
    else {
      if (a[i].first > x && a[i].second == y) r++;
      if (a[i].first < x && a[i].second == y) l++;
      if (a[i].first == x && a[i].second > y) u++;
      if (a[i].first == x && a[i].second < y) d++;
    }
  }
  return (r > 0 && l > 0 && u > 0 && d > 0);
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d%d", &a[i].first, &a[i].second);
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (supercenter(i)) ans++;
  }
  cout << ans << endl;
  return 0;
}
