'How to count number of rows containing a specific value on a specific column using Apache POI?

I'm really new to Java trying to make a project for school. I was wondering on how to read data containing an integer that updates when I update the excel file. Basically I want to count how many students are in a certain grade level range. My excel file looks like this: Image

I want to count the number of students in each section/grade. This code I'm using is just one to count how many students there are overall, and I can't figure out if there's anyway to modify it to make it only count cells with specific data.

int rowCount =  sheet.getPhysicalNumberOfRows() -1;
    System.out.println("No of Students Enrolled: "+rowCount);


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source