#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:16777000")
const long double pi = 3.14159265358979;
const long double eps = 1e-6;
int power(int a, int b) {
  int answer = 1;
  while (b-- > 0) answer *= a;
  return answer;
}
int example[8] = {0, 1, 2, 3, 4, 5, 6, 7};
void Next(int k) {
  int last = example[k - 1];
  for (int i = k - 2; i >= 0; i--) {
    if (example[i] < last) {
      for (int j = k - 1; j >= 0; j--) {
        if (example[j] > example[i]) {
          int temp = example[j];
          example[j] = example[i];
          example[i] = temp;
          break;
        }
      }
      for (int j = i + 1; j < (k - i - 1) / 2 + i + 1; j++) {
        int temp = example[j];
        example[j] = example[k - j + i];
        example[k - j + i] = temp;
      }
      break;
    }
    last = example[i];
  }
}
int min(int a, int b) {
  if (a < b) return a;
  return b;
}
int max(int a, int b) {
  if (a > b) return a;
  return b;
}
long long fact(long long a, long long b) {
  long long answer = 1;
  for (int i = a; i < b + 1; i++) answer *= i;
  return answer;
}
int NOD(int a, int b) {
  if (b > a) {
    int temp = a;
    a = b;
    b = temp;
  }
  while (a % b != 0) {
    int temp = a % b;
    a = b;
    b = temp;
  }
  return b;
}
int main() {
  int n, line[200][2];
  int answer = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d %d", &line[i][0], &line[i][1]);
  for (int i = 0; i < n; i++) {
    bool flag1 = false, flag2 = false, flag3 = false, flag4 = false;
    for (int j = 0; j < n; j++) {
      if (line[j][0] == line[i][0] && line[j][1] > line[i][1]) flag1 = true;
      if (line[j][0] == line[i][0] && line[j][1] < line[i][1]) flag2 = true;
      if (line[j][0] > line[i][0] && line[j][1] == line[i][1]) flag3 = true;
      if (line[j][0] < line[i][0] && line[j][1] == line[i][1]) flag4 = true;
    }
    if (flag1 && flag2 && flag3 && flag4) answer++;
  }
  printf("%d\n", answer);
  return 0;
}
