MIAS: fix off-by-one in directory count