#include <bits/stdc++.h>
bool check(std::vector<int>& v, std::vector<std::vector<int>>& vv) {
  int r = 0, l = 0, u = 0, d = 0;
  int x = v[0], y = v[1];
  for (auto i : vv) {
    int xx = i[0], yy = i[1];
    if (xx > x && y == yy) ++r;
    if (xx < x && yy == y) ++l;
    if (xx == x && yy < y) ++d;
    if (xx == x && yy > y) ++u;
    if (r > 0 && l > 0 && u > 0 && d > 0) return true;
  }
  return false;
}
int main() {
  int n;
  std::cin >> n;
  std::vector<std::vector<int>> v;
  for (int i = 0; i < n; ++i) {
    int j, k;
    std::cin >> j >> k;
    std::vector<int> b;
    b.push_back(j);
    b.push_back(k);
    v.push_back(b);
  }
  int c = 0;
  for (auto i : v) {
    if (check(i, v)) ++c;
  }
  std::cout << c;
}
