const getUniqueIdsCount = (arr) => arr.reduce(
(acc, item) => acc.add(item.id),
new Set(),
).size;
console.log(getUniqueIdsCount(config)); // -> 1
const getIdsCountById = (arr, id) => arr.reduce(
(acc, item) => item.id === id ? acc + 1 : acc,
0,
);
console.log(getIdsCountById(config, 620847764)); // -> 4