calculate the specifity of selectors and sort using it