#include <bits/stdc++.h>   #pragma GCC optimize( Ofast,no-stack-protector )   #pragma GCC target( avx )   int V[100000];   float x;   int main() {     int n, m, l, r, A, T;     scanf( %d%d , &n, &m);     for (int i = 1; i <= n; ++i) scanf( %d , &V[i]);     while (m--) {       scanf( %d%d%d%f , &T, &l, &r, &x);       if (T == 1)         for (int i = l; i <= r; ++i) V[i] -= V[i] > x ? x : 0;       else {         A = 0;         for (int i = l; i <= r; ++i) V[i] == x ? ++A : 0;         printf( %d n , A);       }     }   }   