code: public static int countParameterOfType(ModelMethod method, TypeName parameter) {
  		int counter = 0;
  		for (Pair<String, TypeName> item : method.getParameters()) {
  			if (item.value1.equals(parameter)) {
  				counter++;
  			}
  		}
  
  		return counter;
  	}
docs: Count parameter of type.
  
  @param method
  the method
  @param parameter
  the parameter
  @return the int