I didn't know about the count, but anyhow: We do not need to count. As soon as we have one single changed attribute, we return. So I think the logic is right.

With your approach you would even count attributes having the value "false", which can't happen at the moment, but maybe in future.