Non-reporting hosts (status ‘???’) do not count towards billing. It might take some time (up to 24 hours) for the hosts with the inactive status ‘???’ to drop out of the infrastructure view.
A transient server that you monitored in Datadog for a short period of time will clear out of the infrastructure view after 24 hours of not reporting any data. We will still however retain the historical data (for a paid account), and you can graph it on a dashboard if you know the specific host by name (or by its tags).