システムにインストールされているフォント数を取得するスクリプト

sample.jsx
var fonts = app.fonts;
$.writeln(fonts.length);