DT stats: numbers of records of each kind in DB

File > Database properties gives counts for a more generalised set of record categories.

(for example, jpg, png etc are aggregated to ‘Images’)

This script creates a slightly more specific (comma-delimited) list of counts and kinds, and places it in the clipboard.

tell application id "DNtp"
	tell front database
		set {dlm, my text item delimiters} to {my text item delimiters, linefeed}
		set the clipboard to (do shell script "echo " & quoted form of ¬
			((kind of contents) as text) & " | sort | uniq -c | sed 's/^ *//' | sed 's/ /, /' | sort -n -r")
		set my text item delimiters to dlm
	end tell
end tell

Very clever, Robin. Thanks for posting this 8)