#include <bits/stdc++.h>
using namespace std;
pair<int, int> p[200 + 3];
pair<int, int> origin, temp;
int main() {
  int n, cnt = 0;
  bool right, left, down, up;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> p[i].first >> p[i].second;
  for (int i = 0; i < n; i++) {
    origin = p[i];
    right = left = up = down = false;
    for (int j = 0; j < n; j++) {
      if (i == j) continue;
      temp = p[j];
      if (temp.first > origin.first && temp.second == origin.second)
        right = true;
      else if (temp.first < origin.first && temp.second == origin.second)
        left = true;
      else if (temp.first == origin.first && temp.second > origin.second)
        up = true;
      else if (temp.first == origin.first && temp.second < origin.second)
        down = true;
    }
    if (up && down && right && left) cnt++;
  }
  cout << cnt << endl;
  return 0;
}
