scipy.sparse.lil_matrix.getnnz

lil_matrix.getnnz()

This Page