find <folder path> -mindepth 1 -type f -name "*.<extension>" -exec printf x \; | wc -c