XD-1880 Count integration tests

Last tests to implement before removing test scripts.

Code Polishing