How to count distinct characters in a string?
Simulated data
d = tibble(word = c("aaa", "abc", "abcde"))

How to code a new variable that counts the number of district letters in a string? In other words, this should give an answer as follows:
first row = 1
second row = 3
third row = 5
PS! Tidyverse solutions are especially welcome!