Counting and Localizing Targets with a Camera Network