#include <bits/stdc++.h>
using namespace std;
long long n, m, k, t, a[200005];
vector<pair<pair<long long, long long>, long long> > traps;
vector<pair<long long, long long> > pr;
bool intersect(pair<long long, long long> x, pair<long long, long long> y) {
  long long x1 = x.first, y1 = x.second;
  long long x2 = y.first, y2 = y.second;
  if (x2 >= x1 && x2 <= y1) return true;
  return false;
}
bool check(long long x) {
  pr.clear();
  for (int i = 0; i < k; i++)
    if (traps[i].second > x) pr.push_back(traps[i].first);
  long long cnt = 0;
  sort(pr.begin(), pr.end());
  for (int i = 0; i < pr.size(); i++) {
    long long l = pr[i].first, r = pr[i].second;
    long long j = i;
    while (j < pr.size() - 1 &&
           intersect(pair<long long, long long>(l, r), pr[j + 1]))
      j++, r = max(r, pr[j].second);
    cnt += 2 * (r - l + 1);
    i = j;
  }
  return (cnt + n + 1) <= t;
}
int main() {
  cin >> m >> n >> k >> t;
  for (int i = 1; i <= m; i++) cin >> a[i];
  traps.resize(k);
  for (int i = 1; i <= k; i++)
    cin >> traps[i - 1].first.first >> traps[i - 1].first.second >>
        traps[i - 1].second;
  sort(traps.begin(), traps.end());
  sort(a + 1, a + m + 1);
  long long l = 1, r = m, pos = m + 1;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (check(a[mid]))
      r = mid - 1, pos = mid;
    else
      l = mid + 1;
  }
  cout << m - pos + 1;
  return 0;
}
