added a counting of all the different patron types and a way to encode them