Why did you originally include this line in the configuration?
entity_id: sensor.count
I have the impression you do not understand the purpose of including/excluding this line so here’s how it works:
What it instructs Home Assistant to do is to monitor sensor.count for changes to its state. When its state does change, the value_template is evaluated and sensor.contact_count is updated.
If sensor.count doesn’t change state or rarely changes state (or doesn’t even exist), then sensor.contact_count is never, or rarely, ever updated.
By removing entity_id: sensor.count it makes Home Assistant (on startup) inspect the contents of value_template and identify all the entities it contains. It will then monitor all of these entities for state-changes. That means it will monitor the binary_sensors you have listed in the value_template.