Added count invalid characters