create grant matrix from count matrix