How many cows are there?

I'm going to set up some variables first.

Number of Cows: $C$

Amount of Grass on Day $n$: $G_n$

The rate of growth of grass: $x$ per day

The rate of consumption of grass: $y$ per day

So we have $$G_{n+1}=G_n+x-Cy$$ which give $$G_n=G_0+nx-nCy$$

The first two equations can be easily converted to $$G_{30}=0=G_0+30x-30\cdot17\cdot y\tag{1}$$ $$G_{24}=0=G_0+24x-24\cdot19\cdot y\tag{2}$$

This gives $$x=9y\tag{*}$$

For the last one, the recurrence relation no longer holds but the idea is the same, so we have $$0=G_0+(6+2)x-6Cy-2(C-4)y$$ which simplifies to $$0=G_0+8x-(8C-8)y\tag{3}$$

The rest is algebraic work. Using $(1)$ and $(*)$, you will get $C=40$.


$$\begin{aligned} V+30x&=30\times 17\times y\\ V+24x&=24\times 19\times y\\ V+8x&=6\times k\times y+2(k-4)\times y\\ V&=510y-30x\\ x&=9y\\ 510y-22x&=(8k-8)y\\ 510y-198y&=(8k-8)y\\ k&=40 \end{aligned}$$ where $V$ - value of grass on the field, $x$ - speed of growth grass for a day, $y$ - speed of 1 cow for a day, $k$ - number of cows.