This came up on the forums recently and it is a fairly frequent request. So here I run through how to create a composite data source that allows you to create a rule that checks for x events in y minutes with both the event count and the time interval exposed as overrides.
Create a new Empty Management Pack (e.g. called XEventsInYMinutes)

Assign a Display Name of Alert on X Events In Y Minutes

Go to Type Library and create a new composite data source

Give the composite data source a unique identifier e.g. XEventsInYMinutes.ConsolidatedEvents
