Convert influxQL to flux with count() in select statement

I need to convert this query to a flux query:

SELECT count("value") FROM "ALARMS" WHERE ("status" = 'Good' AND "value" = 1) AND $timeFilter GROUP BY "EventText"

It’s an InfluxQL query from Grafana, that explains the $timeFilter variable.
I can write a basic Flux query but I don’t have any idea how to write the count(“value”) in Flux.

Anybody has any idea?

Thanks in advance