count number of files in a folder using javascript