#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
struct node {
  int l, r, w;
  bool operator<(const node& a) const { return l < a.l; }
} p[maxn];
int a[maxn];
int m, n, k, t, mx;
vector<node> q;
int check(int u) {
  q.clear();
  for (int i = 1; i <= k; i++)
    if (p[i].w > u) q.push_back(p[i]);
  if (q.size() == 0) {
    return n + 1;
  }
  sort(q.begin(), q.end());
  int cnt = 0, l = q[0].l - 1;
  int r = q[0].r;
  for (int i = 1; i < q.size(); i++) {
    if (q[i].l - 1 <= r)
      r = max(q[i].r, r);
    else {
      cnt += (r - l) * 2;
      l = q[i].l - 1;
      r = q[i].r;
    }
  }
  cnt += (r - l) * 2;
  cnt += n + 1;
  return cnt;
}
int main() {
  scanf("%d%d%d%d", &m, &n, &k, &t);
  for (int i = 1; i <= m; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= k; i++) {
    scanf("%d%d%d", &p[i].l, &p[i].r, &p[i].w);
  }
  sort(a + 1, a + 1 + m);
  int l = 1, r = m, mid;
  while (l <= r) {
    mid = l + r >> 1;
    if (check(a[mid]) <= t)
      r = mid - 1;
    else
      l = mid + 1;
  }
  cout << m - l + 1 << '\n';
}
