transforming strings into arrays, using zip, custom count method