Change count back to forEach

You can not nest count loops inside other count loops:
https://community.bistudio.com/wiki/Code_Optimisation#forEach_vs_count