#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[205][2];
  int i, j;
  int count2 = 0, count3 = 0, count4 = 0, count5 = 0;
  int count1 = 0;
  for (i = 0; i < n; i++) {
    cin >> arr[i][0] >> arr[i][1];
    cout << endl;
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      if ((arr[j][0] > arr[i][0]) && (arr[j][1] == arr[i][1])) {
        count2 = 1;
      }
      if ((arr[j][0] < arr[i][0]) && (arr[j][1] == arr[i][1])) {
        count3 = 1;
      }
      if ((arr[j][0] == arr[i][0]) && (arr[j][1] < arr[i][1])) {
        count4 = 1;
      }
      if ((arr[j][0] == arr[i][0]) && (arr[j][1] > arr[i][1])) {
        count5 = 1;
      }
      if ((count2 == 1) && (count3 == 1) && (count4 == 1) && (count5 == 1)) {
        count1++;
        break;
      }
    }
    count2 = 0;
    count3 = 0;
    count4 = 0;
    count5 = 0;
  }
  cout << count1;
}
