Typecast rank to a number