add nnz command

Fixes #132.