primitive count for index count function