Here is one way to write a Python function to count the number of unique characters in a string:

```
def count_unique_chars(string):
    unique_chars = set(string)
    count = len(unique_chars)
    return count
```

In this function, we first convert the input string into a set using the `set()` method. This automatically removes any duplicate characters and gives us a set of only the unique characters in the string. We then use the `len()` function to find the length of this set, which gives us the count of unique characters. Finally, we return this count from the function. 

Let's test the function with the given string:

```
string = "Butterflies"
print(count_unique_chars(string))
```

The output will be: 

```
9
```

This means that there are 9 unique characters in the string "Butterflies".
stringa = &quot;Farfalle&quot;
Progettare una funzione per contare il numero di caratteri univoci in una stringa.