def get_package_counts(package_descriptors, targets, repos_data):
counts = {}<EOL>for target in targets:<EOL><INDENT>counts[target] = [<NUM_LIT:0>] * len(repos_data)<EOL><DEDENT>for package_descriptor in package_descriptors.values():<EOL><INDENT>debian_pkg_name = package_descriptor.debian_pkg_name<EOL>for target in targets:<EOL><INDENT>for i, repo_data in enumerate(repos_data):<EOL><INDENT>version = repo_data.get(target, {}).get(debian_pkg_name, None)<EOL>if version:<EOL><INDENT>counts[target][i] += <NUM_LIT:1><EOL><DEDENT><DEDENT><DEDENT><DEDENT>return counts<EOL>
Get the number of packages per target and repository.

:return: a dict indexed by targets containing
  a list of integer values (one for each repo)