JSFiddle - React, Tailwind, and code Playground

JavaScript

let data = ["2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-21", "2017-06-22", "2017-06-22", "2017-06-22", "2017-06-23", "2017-06-23", "2017-06-23", "2017-06-23", "2017-06-23", "2017-06-23", "2017-06-23", "2017-06-23", "2017-06-23", "2017-06-23", "2017-06-23", "2017-06-23", "2017-06-23", "2017-06-23", "2017-06-23", "2017-06-25", "2017-06-26", "2017-06-26", "2017-06-26", "2017-06-26", "2017-06-26", "2017-06-26", "2017-06-26", "2017-06-26", "2017-06-26", "2017-06-26", "2017-06-27"]

let res = data.reduce((acc, d)=>{
	e = acc.find(e=> e[0] == d);
  if(e) e[1]++;
  else acc.push([d, 1]);
  return acc;
}, [])


console.log(res)