#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, arr[201][2], counter = 0;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i][0] >> arr[i][1];
  for (int i = 0; i < n; i++) {
    int right = 0, left = 0, lower = 0, upper = 0;
    for (int j = 0; j < n; j++) {
      if (i != j)
        if (arr[j][0] > arr[i][0] && arr[j][1] == arr[i][1])
          right++;
        else if (arr[j][0] < arr[i][0] && arr[j][1] == arr[i][1])
          left++;
        else if (arr[j][0] == arr[i][0] && arr[j][1] < arr[i][1])
          lower++;
        else if (arr[j][0] == arr[i][0] && arr[j][1] > arr[i][1])
          upper++;
    }
    if (right && left && lower && upper) counter++;
  }
  cout << counter << endl;
  return 0;
}
