- Reworked code to count installed packages (based on filters).