The ? : operator is the one and only trinary operator in C. Its syntax is:
exp1 ? exp2 : exp3
First exp1 is evaluated. If it evaluates to true, then exp2 is evaluated, and the result of the entire expression is the value of exp2. Otherwise, exp3 is evaluated, and the result of the entire expression is exp3. Note that exp2 and exp3 must have the same type, and the type of the entire expression is that type.
So for the expression
(item == nil) ? 1 : [item numberOfChildren]
If item==nil evaluates to true (i.e. item is nil), then the expression evaluates to 1, and 1 is returned. Otherwise, the expression evaluates to [item numberOfChildren].
Any book on C should cover this; you would be well served by finding one.
-Peter