If you select multiple files, right-click > File > Export to Matlab, it would create multiple variables in your workspace (eg. a1, a2, a3...). It is after that not so easy to automated the counting.
You could also write a script to get all the raw files from the database, and then a loop on these files to count the events more efficiently:
- You can get all the raw links in the current protocol with the new search tools:
https://neuroimage.usc.edu/brainstorm/Tutorials/PipelineEditor#Search_Database - You can run this search from a script: to get the script corresponding to your search, click on the button "Generate process call" at the bottom-left corner of the "Search Database" window
- You may find lots of other interesting resources for scripting on this page:
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting - Specifically reading functions for data files (or simply use the load() function from Matlab and file_fullpath() to get the absolute file names): https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting#Reference:_File_manipulation