They look at the patient and see if the Covid caused the heart failure, or if it was just a person with Covid that tested positive. If you look at Belgium or France, they are much more lenient and count anyone who was even suspected of having Covid and as a result they have a much higher rate. The whole thing is a moving target, and final numbers will definitely be recalculated.
But, even in Germany, if a person is in a nursing home and tests positive and dies, that is counted as a covid death. But if a person was living at home and goes to the hospital for some reason and dies and it is found out later that he tested positive, that won't count. This happened recently to my brother in law's neighbor who was in her mid nineties with bone cancer, and she finally failed and had to go to the hospital. When he talked to her family afterwards, they said the death certificate stated cancer, as it should.
At the end of the day, we'll have to do a deep analysis of excess deaths to really know what happened, and posting graphs and charts is not really helpful or very telling right now. But hopefully it will also be a wake-up call in this country on how we care for the elderly and how our policies encourage obesity and diabetes in the young.
It's no secret that we screwed up testing in a big way, and we value privacy much more than other countries so contact tracing will never work, but if anyone takes the emotion out of it and looks at the actual people who died, it is clear who we failed the most. My daughter is a combat medic and was one of soldiers that went to a nursing home to help sanitize and assist the staff, and she was appalled at the general cleanliness, and this wasn't some slum nursing home. We can do better.