Push * (Shift+8) to open the Filter Bar. (This is also a quicker way to filter on file names/extensions.)
On the left of the Filter Bar are some shown, then hidden, file and folder counts. Click the far left file icon and all files will be hidden.
If it's something you do a lot, you can do it quicker and avoid having to open the Filter Bar by creating a toolbar button or hotkey which runs this command:
Set QUICKFILTERFLAGS=hidefiles
That command will automatically work as a toggle, so pushing the same button/hotkey a second time will show the folders again.