size() and isEmpty() now have parameter withValue. This is used to only count states with a value.