select userid from user;
+---------+
| userid  |
+---------+
| .1.     |
| .1.1.   |
| .1.2.   |
| .1.2.1. |
+---------+
I want the result like this :
+---------+-------+
| userid  | count |
+---------+-------+
| .1.     | 2     |
| .1.1.   | 3     |
| .1.2.   | 3     |
| .1.2.1. | 4     |
+---------+-------+
The count field is about how many the dots are in a row.
What is the sql for that? Thank you