ul li:nth-last-child(-n + 2) {
    /* .. */
}

Source et support navigateur (IE9+ pour IE) : http://css-tricks.com/almanac/selectors/n/nth-last-child/