# How to find the dimension of Grobner basis

I have a set POLY of multivariate polynomials over integer. From this set, we can calculate Grobner basis as follows:

```
I=(POLY)*RING
I=Ideal(I)
B = I.groebner_basis()
```

where RING is the corresponding polynomial ring. I want to find the dimension of B as defined in https://en.wikipedia.org/wiki/Gr%C3%B....

How to find that in Sage?