To calculate honestly the actual number of deaths that can be said to be "because of Communism", you would need to look at:
1) Documented executions with clear political motivation
2) Deaths in prison camps or through forced labor where intentionally harsh conditions led directly to death
3) Deaths from political violence carried out by state forces
4) Cases where historical evidence and scholarly consensus provide reasonable certainty

Meaning you'd exclude things like:
- Military deaths in civil wars or international conflicts
- Deaths where attribution is unclear or disputed
- Demographic shortfalls or estimated "excess deaths" (things like the 1-child policy )
- Deaths from famines or economic policies (India for instance had many more famines than China with vastly more deaths yet everyone would agree it'd be very intellectually dishonest to attribute these to "capitalism")

Based on this the total tally of deaths that can be said to be "because of Communism" is roughly 5-6 million people, broken down as such:
- Soviet Union: approximately 3m deaths during Dekulakization and Forced Collectivization, Stalin's "Great Terror"/Purges and the Gulag system 
- Cambodia under the Khmer Rouge: approximately 1.5m deaths
- PRC: approximately 1m deaths during the Land Reform Movement (mass killings of landlords) and the Cultural Revolution 
- North Korea: 0.5m deaths in the prison camp system (kwalliso) and political executions
- Vietnam: about 20,000 killed during the land reform campaign 

What would be very interesting to do is to apply the exact same methodology for deaths "because of capitalism" and you'd undoubtedly find out that the number is far, far higher.