ls -lh /private/var/vm/swapfile* to see how many swap files are being used.

in Solaris, you can use

swap -l to see swap devices/files, and their sizes

swap -s to see total swap size, used & free

vmstat to see virtual memory statistics

On some systems, "virtual memory" refers only to disk-backed memory devices, and on other systems, like Solaris, Virtual Memory can refer to any user process address space, including tmpfs filesystems (like /tmp) and shared memory space.