Initialize count matrices