Adam had twice as many sheep as the cows, so 2 sheep/cow * 12 cows = <<2*12=24>>24 sheep.
For every sheep, he bought 3 pigs, so he bought 3 pigs/sheep * 24 sheep = <<3*24=72>>72 pigs.
In total on the farm, there were 72 pigs + 24 sheep + 12 cows = <<72+24+12=108>>108 animals.
#### 108