Wrong count with custom filter.

#339 

@amitaibu @mateu-aguilo-bosch 

I have added a custom filtering condition to the count as well.
![selection_040](https://cloud.githubusercontent.com/assets/7369740/5546990/bbcce4dc-8b58-11e4-8f9d-6e80eceb0bf3.png)

This solved the count issue for me.