On a farm there were some hens and sheep.

Altogether there were $8$ heads and $22$ feet.

How many hens were there?