Get number of files in a directory

Just modify the example to select and count what you need.