code: public int count(Severity severity) {
  		int result = 0;
  		if (severity == null) {
  			return result;
  		}
  		for (ValidationMessage<Origin> message : messages) {
  			if (severity.equals(message.getSeverity())) {
  				result++;
  			}
  		}
  		return result;
  	}
docs: Counts validation messages by its severity.
  
  @param severity a severity of the message which should be counted
  @return a number of validation messages with provided severity