html_entity_decode
only decodes HTML entities, it doesn't ignore HTML tags. Try:
strlen(strip_tags(html_entity_decode($string)));
Or the multi-byte equivalent:
mb_strlen(strip_tags(html_entity_decode($string)), 'auto');
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…