Augmenting the array while iterating over it gets confusing results

* Search results and count would be out of sync due to splicing array
  inside an each call, I filter instead.
Merge pull request #31 from zendesk/rseddon/wrong_count

[BUG] Augmenting the array while iterating over it gets out of sync results