Add method to retrieve the significant directory count

See ticket #10296.
MIAS: fix a few bugs in the getRequiredDirectories implementation
MIAS: fix off-by-one in directory count
Merge pull request #374 from melissalinkert/10296

Add method to retrieve the significant directory count