How to configure grafana alerts for spikes?

Hi everyone!
I have a question regarding Grafana Cloud Alerts.
Currently working on configuring the alerts for spikes history having such arguments:
minimumErrorRate = 0.1
maximumErrorRate = 0.2
maximumLookBackTimeInMinutes = 120
numberOfSpikesToAlertOn = 4

The question is in the last argument. How to make grafana send the alerts after the 4th spike?
My query in Prometheus will look like this:
0.1 <
sum by(provider)(count_over_time(task_count_by_provider:rate5m{status=“error”}[120m]))
< 0.2

A spike is defined here as: an increase in the error rate from ‘low’ to some bounded range, and then returning to ‘low’ within some maximum period. If the error-rate goes high before or after an event, it is not a spike

I would really appreciate any advice!