The following gist fixes an issue where a category’s children are counted wrong. Due to this issue, the children are not displayed in the Magento backend. This gists does a manual recount and shows whether they need fixing or not. I’m unaware if the cause of this but a one time fix seems to solve it.