partitionsNumber function

Number of different models