#include <bits/stdc++.h>
using namespace std;
const int modu = 1e9 + 7;
long long int mod(long long int n) { return (n % modu); }
bool cmp(long long int a, long long int b) { return a > b; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int N, a, b, c, d, x = 0;
  pair<int, int> P[205], s;
  cin >> N;
  for (int i = 0; i < N; i++) {
    cin >> P[i].first >> P[i].second;
  }
  for (int i = 0; i < N; i++) {
    a = b = c = d = 0;
    s.first = P[i].first;
    s.second = P[i].second;
    for (int j = 0; j < N; j++) {
      if (i != j) {
        if (P[j].first > s.first && P[j].second == s.second)
          a = 1;
        else if (P[j].first < s.first && P[j].second == s.second)
          b = 1;
        else if (P[j].first == s.first && P[j].second > s.second)
          c = 1;
        else if (P[j].first == s.first && P[j].second < s.second)
          d = 1;
      }
    }
    if (a == 1 && b == 1 && c == 1 && d == 1) x++;
  }
  cout << x;
  return 0;
}
