I am trying to make a function which counts the number of directories in a directory using C language on linux terminal. I have tried my best but I still do not know why and