Typescript Array Count Function In Power