answer: He was a candidate in the 2008 United States Republican presidential primaries , finishing second in delegate count and third in both popular vote and number of states won (behind both John McCain and Mitt Romney ).