I'd prefer change this function as `int get_dir_entry_count(const std::string& path)`,