Fix CKAN package count method and add test

The package count method had a flaw on some endpoints. At least on
catalog.data.gov the use of the Search API returns a different count.
The result was five times bigger than the value retrieved through the
Action API. Hence, I have written a unit test for this case, adding
WebMock, and fixed the problem.

Signed-off-by: Konrad Reiche <konrad.reiche@gmail.com>