[beaker-tests-sanity] count packages more reliably
The previous version relied on the fact, that there is only one "name"
field per package json. That sounds reasonable at first, because how
can there be more names? Well, in inner dicts it can.
{
"id": 318166,
"name": "ed",
...
"builds": [
{
"id": 836680,
"source_package": {
"name": "ed",
...
}
}
]
}
We needed to use a tool that understands the json format (jq) and
parse just the package names from it. And then compare them and
count them.