counts folders correctly; closes #78