for a project I'm doing with d3.js I need to access a .csv file with multiple values and to be able to know how many rows of the same column have one particular string of text.
Specifically, I have a column that has "Sans" or "Serif" values, and what I tried to do is to create a for loop to get how many rows have those values, but with no result unluckily.
What I tried to do is add this loop in the callback function of the .csv load:

```
    var serif = 0,
    sans = 0;

for (var i = 0; i >= dataset.length; i++) 
    { 
    if (dataset.Grazie = "Sans")
    { return sans += 1; }
    else { return serif += 1; };
    };

    console.log(serif);
    console.log(sans);

```

but in the console the value is still 0.
The column in the dataset is called "Grazie" and the only two values on that column are Sans or Serif. i tried

Any help would be highly appreciated! Thanks!

**EDIT: thanks to Lugia101101 i managed to find the solution, which is:**

```
for (var i = 0; i < dataset.length; i++) {
    if (dataset[i].Grazie == "Sans") { sans ++; }
    else { serif++; }
};

```