Fix problem with calculating correct hover over measure count.

Fixes #310.