check an array has mix of values

I have a condition where if a list contains only numbers as 10, i.e{10,10,10,10} I should  return 1 else If list contains any numbers apart from 10 i.e{23,50,60} I have to return   0 else if that list contains mix of 10 and other numbers {10,23,45} then I have to return as 2. how can i write this in expression rule ? 

  Discussion posts and replies are publicly visible