Fix a bug about rmdir

Add a counter to differentiate the empty folder