scipy.sparse.csr_matrix
scipy.sparse.csr_matrix.has_sorted_indices
Number of stored values, including explicit zeros.
See also