Incremental inference of collective graphical models