That’s just one of the approaches, another one is counting excess deaths - delta between predicted and actual mortality rates.
It normalizes against external factors, such as poor testing infrastructure or (in some countries) government pressure to keep the numbers low.
https://www.economist.com/graphic-detail/2020/04/16/tracking...