Add a function for enum cpu's num.

Signed-off-by: Yunchao Chen <chenyc@marvell.com>