One-to-many relationships in Java is typically implemented as a List property:
class School {
private List <Student> students;
...
So to know how many students does your school have you call students.size()
.
I hope I understood your question correctly.