Changed forEach to count  in test

Seemed to fix it for me on my server