Counter for ScanTagActivity added.
Some refactoring.