#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
int A[maxn];
struct Node {
  int l, r, d;
  bool operator<(const Node &T) const { return l < T.l; }
} traps[maxn];
int main(void) {
  int m, n, k, t;
  cin >> m >> n >> k >> t;
  for (int i = 1; i <= m; i++) {
    scanf("%d", &A[i]);
  }
  sort(A + 1, A + m + 1);
  for (int i = 0; i < k; i++) {
    scanf("%d%d%d", &traps[i].l, &traps[i].r, &traps[i].d);
  }
  sort(traps, traps + k);
  A[m + 1] = maxn;
  int L = 1, R = m + 1;
  while (L < R) {
    int M = (L + R) / 2;
    int need = 0, me = 0, team = 0;
    for (int i = 0; i < k; i++) {
      if (me < traps[i].l) {
        need += traps[i].l - 1 - me + 2 * (me - team);
        team = me = traps[i].l - 1;
      }
      if (traps[i].d > A[M] && traps[i].r > me) {
        need += traps[i].r - me;
        me = traps[i].r;
      }
    }
    need += n + 1 - me + 2 * (me - team);
    if (need > t)
      L = M + 1;
    else
      R = M;
  }
  cout << m - L + 1 << endl;
  return 0;
}
