#include <bits/stdc++.h>
using namespace std;
int n, x[300], y[300];
bool is(int X, int Y) {
  bool b[4];
  b[0] = b[1] = b[2] = b[3] = false;
  for (int i = 1; i <= n; i++) {
    if (X == x[i])
      if (y[i] > Y)
        b[2] = true;
      else if (y[i] < Y)
        b[3] = true;
    if (Y == y[i])
      if (x[i] > X)
        b[0] = true;
      else if (x[i] < X)
        b[1] = true;
  }
  for (int i = 0; i < 4; i++)
    if (!b[i]) return false;
  return true;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> x[i] >> y[i];
  int num = 0;
  for (int i = 1; i <= n; i++) num += is(x[i], y[i]);
  cout << num << endl;
}
