#include <bits/stdc++.h>
using namespace std;
pair<int, int> arr[205];
int n;
bool hasUpper(int x, int y) {
  for (int i = 0; i < n; i++) {
    if (arr[i].first == x && arr[i].second > y) return true;
  }
  return false;
}
bool hasLower(int x, int y) {
  for (int i = 0; i < n; i++) {
    if (arr[i].first == x && arr[i].second < y) return true;
  }
  return false;
}
bool hasLeft(int x, int y) {
  for (int i = 0; i < n; i++) {
    if (arr[i].first < x && arr[i].second == y) return true;
  }
  return false;
}
bool hasRight(int x, int y) {
  for (int i = 0; i < n; i++) {
    if (arr[i].first > x && arr[i].second == y) return true;
  }
  return false;
}
int main() {
  int res = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d%d", &arr[i].first, &arr[i].second);
  for (int i = 0; i < n; i++) {
    if (hasUpper(arr[i].first, arr[i].second) &&
        hasLower(arr[i].first, arr[i].second) &&
        hasLeft(arr[i].first, arr[i].second) &&
        hasRight(arr[i].first, arr[i].second))
      res++;
  }
  printf("%d\n", res);
  return 0;
}
