Modify populate_graph_matrix to more accurately report the number of
categories processed. Functionality is unchanged.