I have a number 12,234,123.23 in which I use a split method as follows :

```
num1= number.toString().split(".")[0];
// num1.length returns 10.

```

But I want only the number of integers (that is => 8 (excluding commas) to be returned.

Kindly suggest a way in which I could achieve it using JavaScript