Typescript Count Unique Values In Array Python Size Function In Ggplot2