code wars responsable drinker

C
function hydrate(s) {
   let waterCount = s.split('').filter(e => e.match(/\d/)).reduce((acc, val) => +acc + +val, 0);
  return waterCount > 1 ? `${waterCount} glasses of water`: `${waterCount} glass of water`;
}
Source

Also in C: