Debug.
Static test.
getMsgsCount() added.
Debug.
For tests.