Typescript Array Count Method In Javascript Alert