Add a test checking for correct counts in case of duplicates

Note that this will fail until https://github.com/jenkinsci/analysis-core-plugin/pull/21 is merged.