only count latest agent versions
Merge pull request #29 from wuan/license_count_fix

fix #27 by only counting latest agent versions