Fix to count scanned packages with ConfigureContext
Add support for conditions