#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int x[n], y[n];
  for (long long int i = (0); i < (n); i++) cin >> x[i] >> y[i];
  bool r[200] = {false}, le[200] = {false}, u[200] = {false}, lo[200] = {false};
  for (long long int i = (0); i < (n); i++) {
    for (long long int j = (i + 1); j < (n); j++) {
      if (y[j] == y[i]) {
        if (x[j] > x[i]) {
          r[i] = true;
          le[j] = true;
        } else {
          le[i] = true;
          r[j] = true;
        }
      }
      if (x[j] == x[i]) {
        if (y[j] > y[i]) {
          u[i] = true;
          lo[j] = true;
        } else {
          lo[i] = true;
          u[j] = true;
        }
      }
    }
  }
  int ans = 0;
  for (long long int i = (0); i < (n); i++)
    if (r[i] && le[i] && u[i] && lo[i]) ans++;
  cout << ans;
  return 0;
}
