Fixed deprecated methods is fields.html.twig

Replaced hasParent with check on emptiness of form.parent and hasChildren
with form.count