code: public synchronized int size(int event_type) {
          int cnt = 0;
          for (EventData event : events)
              if (event.event_type == event_type)
                  cnt++;
          return cnt;
      }
docs: ==================================================================