public void countEvents(Object eventObject) {
        if (eventObject instanceof Event[]) {
            eventCounter = eventCounter + ((Event[]) eventObject).length;
            totalEventCounter = totalEventCounter + ((Event[]) eventObject).length;
        } else {
            eventCounter++;
            totalEventCounter++;
        }
    }
Log number of events received by each receiver
modules/siddhi-core/src/main/java/io/siddhi/core/util/statistics/ReceivedEventCounter.java