#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3fLL;
const double PI = acos(-1.0);
const long double eps = 1e-14;
const int mod = 1e9 + 7;
const int maxn = 20;
const int N = 2e5 + 10;
const int M = 1e9 + 7;
const long long mm = (1LL << 32);
template <class T>
inline void read(T &x) {
  x = 0;
  char c = getchar();
  bool f = 0;
  for (; !isdigit(c); c = getchar()) f ^= c == '-';
  for (; isdigit(c); c = getchar()) x = x * 10 + (c ^ 48);
  x = f ? -x : x;
}
template <class T>
inline void write(T x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  T y = 1;
  int len = 1;
  for (; y <= x / 10; y *= 10) ++len;
  for (; len; --len, x %= y, y /= 10) putchar(x / y + 48);
}
long long qpow(long long a, long long b, long long MOD) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % MOD;
    b >>= 1;
    a = (a * a) % MOD;
  }
  return ans;
}
int a[N], b[N];
int n, m, k, t;
struct node {
  int l, r, d;
} c[N];
bool judge(int x) {
  for (int i = 1; i <= n + 1; ++i) b[i] = 0;
  int v = a[x];
  int sum = 0;
  for (int i = 1; i <= k; ++i)
    if (c[i].d > v) b[c[i].l]++, b[c[i].r + 1]--;
  for (int i = 1; i <= n + 1; ++i) b[i] += b[i - 1];
  for (int i = 1; i <= n + 1; ++i) sum += (b[i] >= 1);
  sum = sum * 2 + n + 1;
  return sum <= t;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> m >> n >> k >> t;
  for (int i = 1; i <= m; ++i) cin >> a[i];
  for (int i = 1; i <= k; ++i) cin >> c[i].l >> c[i].r >> c[i].d;
  sort(a + 1, a + 1 + m);
  int l = 1, r = m;
  int ans = 0;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (judge(mid)) {
      ans = mid;
      r = mid - 1;
    } else
      l = mid + 1;
  }
  if (ans == 0)
    cout << 0 << endl;
  else
    cout << m - ans + 1 << endl;
  return 0;
}
