add func to get matrix of event counts