implement vector_count