Change method to set count fixes #6430.
Update CollectionTest.php
Update CollectionTest.php
Merge branch 'hotfix/#6443-fix-#6430-form-collection-element-count-fix'

Close #6443
Close #6430