Let me have a simple example of my problem.
$children = array(
new Child(),
new Child(),
new Child());
$parent = new Parent();
$parent->child = $children;
echo count($parent->child); // should return 3, but it returns 0 instead
... inside $parent's validate function
return count($this->child) >= 3;
You can see that I have no longer a reference to the children array but through $parent->child only.
The problem is that $parent->child seems to not return the children array anymore. Upon successfully saving the $parent those children were also saved which is correct.
So why count() won't be able to count an array of newly created model (not yet saved to database) if it's a simple array?