Count State '1' of Binary Sensor

Hi experts,
In Grafana v10.0.3 I already have a state timeline for a binary_sensor.
This works quite well with the following query:

Query Text:
SELECT top(“value”, 1) FROM “autogen”.“state” WHERE (“entity_id”::tag = status_waschmaschine’) AND $timeFilter GROUP BY time($__interval) fill(none)

Now I would like to set up a stat panel in which the state ‘1’ of the entity status_waschmaschine is counted and output (How often did the washing machine run in the selected period?). But here I can’t get any data out with the following query, not even after hundreds of tries.

Query Text:
SELECT count(“value”) FROM “autogen”.“state” WHERE (“entity_id”::tag = ‘status_waschmaschine’ AND “value”::field = ‘1’) AND $timeFilter GROUP BY time($__interval) fill(none)

Can any of you maybe see where the error could be? What am I doing wrong?

Thanks in advance for any help!

Best regards