As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
please can anyone help me in this
I don't think there is any OOTB web script. You can write your own webscript backed by Java or Javascript.
Similar question can already be found in the forum:
https://community.alfresco.com/thread/242495-how-to-get-how-many-folders-and-sub-folders-are-present-in-a-site
Its better to search the forum before creating a new question.