This didn’t work because of scope: the count inside the loop is a different variable to the one outside. To directly fix your code, you’d need a namespace:
value_template: >-
{% set ns = namespace(count = 0) %}
{% for sensor in ['binary_sensor.chair2_opening_5', 'binary_sensor.2_opening_5', 'binary_sensor.black_chair_3_opening_5'] %}
{% if is_state(sensor, 'on') %}
{% set ns.count = ns.count + 1 %}
{% endif %}
{% endfor %}
{{ ns.count >= 2 }}
EDIT: I see others have answered whilst I was typing this, but will leave here anyway as an explanation of why yours didn’t work; as well as a slightly different approach to the solution.
You could create this via the UI: create a template binary sensor with just the bits in {{ ... }} in the State template box:
Thanks a lot folks for a quick and rich on ideas reply!
It’s widen my mind on what Jinja templates can offer and brought the light on what has really happened with the state of the poor variable count.
I’m coming from this discussion empowered and even more confident about the bright future of HomeAssistant!
Special thanks on @tom_l for the notice about sensor id. I was not aware of this limitation. I’ve renamed immediately. It is always pays out giving speaking names names for entities.