Taking filters into account to calculate scope counts

- The counters are now update after each ajax request
- Removed some unnecessary code