Fixed getVariantCount().

closes #3.