assertAccessModifier

Tests whether the access modifier count is correct and fails it with a predefined message if it fails.