legend count