Changed forEach to count  in test

Seemed to fix it for me on my server
Merge pull request #153 from deannreid/patch-2

Changed forEach to count  in test