KAA-280: Fix extension count calculation