code: func ComputeSpecificity(selector string) int {
  	result := 0
  
  	if selector == inlineFakeSelector {
  		result += 1000
  	}
  
  	result += 100 * strings.Count(selector, "#")
  	result += 10 * len(nonIDAttrAndPseudoClassesRegexp.FindAllStringSubmatch(selector, -1))
  	result += len(elementsAndPseudoElementsRegexp.FindAllStringSubmatch(selector, -1))
  
  	return result
  }
docs: // ComputeSpecificity computes style rule specificity
  //
  // cf. http://www.w3.org/TR/selectors/#specificity