JSFiddle - React, Tailwind, and code Playground
JavaScript
const add = (a,b)=>a+b;
const getCount = it => it.count;
const byType = type => (it => it.type === type);
fetch('https://hsto.org/getpro/habr/data/karmograf.json')
.then(resp => resp.json())
.then(json => {
const plus = json.filter(byType('plus' )).map(getCount).reduce(add);
const minus = json.filter(byType('minus')).map(getCount).reduce(add);
document.body.innerHTML = '+' + plus + ' / ' + minus;
})