#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int T = 1;
  while (T--) {
    long long int m, n, k, t, i;
    cin >> m >> n >> k >> t;
    vector<long long int> sol(m);
    for (i = 0; i < m; i++) cin >> sol[i];
    sort((sol).begin(), (sol).end());
    vector<pair<long long int, pair<long long int, long long int>>> traps(k);
    for (i = 0; i < k; i++) {
      cin >> traps[i].first >> traps[i].second.first >> traps[i].second.second;
    }
    sort((traps).begin(), (traps).end());
    long long int l, r, mid;
    l = 0;
    r = 200005;
    long long int ans = r;
    while (l <= r) {
      mid = (l + r) / 2;
      long long int tm = n + 1;
      long long int donest = -1;
      long long int doneend = -1;
      for (auto x : traps) {
        if (x.second.second > mid) {
          if (donest == -1) {
            donest = x.first;
            doneend = x.second.first;
          } else if (x.first <= doneend) {
            doneend = max(doneend, x.second.first);
          } else {
            tm += 2 * (doneend - donest + 1);
            donest = x.first;
            doneend = x.second.first;
          }
        }
      }
      if (donest != -1) {
        tm += 2 * (doneend - donest + 1);
      }
      if (tm <= t) {
        r = mid - 1;
        ans = min(ans, mid);
      } else
        l = mid + 1;
    }
    ans = lower_bound((sol).begin(), (sol).end(), ans) - sol.begin();
    cout << m - ans << "\n";
  }
  return 0;
}
