omp'd column-wise counting for all types of matrices