Add schemas code

`hist.counts.getOrElse(master, 0)`.