Let x be the number of goats
Cows:4+x
Pigs:2(4+x)=8+2x
Total:x+4+x+8+2x=56
4x+12=56
4x=44
x=<<11=11>>11 goats
#### 11