#include <bits/stdc++.h>
using namespace std;
inline long long int GCD(long long int x, long long int y) {
  if (x < y) swap(x, y);
  if (x == 0) return y;
  if (y == 0) return x;
  return GCD(x % y, y);
}
long long int phi(long long int n) {
  long long int result = n;
  for (long long int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      while (n % i == 0) n /= i;
      result -= result / i;
    }
  }
  if (n > 1) result -= result / n;
  return result;
}
long long int power(long long int x, long long int n, long long int mod) {
  long long int res = 1;
  x %= mod;
  while (n) {
    if (n & 1) {
      res = ((res * x) % mod + mod) % mod;
    }
    x = ((x * x) % mod + mod) % mod;
    n >>= 1;
  }
  return res;
}
const int MAXN = 2e5 + 5;
vector<pair<pair<long long int, long long int>, long long int> > v;
long long int m, n, k, t;
long long int a[MAXN];
bool check(long long int kitne) {
  long long int j = 0, tim = 0;
  long long int d = a[kitne];
  for (long long int i = 0; i <= n;) {
    if (j < k && v[j].first.first == i + 1) {
      while (j < k && v[j].first.first == i + 1) {
        if (v[j].second > d) {
          long long int J = j + 1;
          long long int right = v[j].first.second;
          long long int dd = v[j].second;
          while (J < k) {
            if (v[J].first.first <= right) {
              if (v[J].second > d) {
                right = max(v[J].first.second, right);
                J++;
              } else
                J++;
            } else
              break;
          }
          tim += 3 * (right - i);
          i = right;
          j = J;
          break;
        } else {
          j++;
        }
      }
    } else {
      i++;
      tim++;
    }
  }
  return tim <= t;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> m >> n >> k >> t;
  for (long long int i = 1; i <= m; i++) {
    cin >> a[i];
  }
  sort(a + 1, a + m + 1);
  long long int l, r, d;
  for (long long int i = 0; i < k; i++) {
    cin >> l >> r >> d;
    v.push_back(make_pair(make_pair(l, r), d));
  }
  sort(v.begin(), v.end());
  long long int ans = 0;
  l = 1, r = m;
  while (l <= r) {
    long long int mid = (l + r) / 2;
    if (check(mid)) {
      ans = m - mid + 1;
      r = mid - 1;
    } else {
      l = mid + 1;
    }
  }
  cout << ans << endl;
}
