Typescript Count Array Javascript Methods Cheat