The farmer planted a total of 30 x 10 = <<30*10=300>>300 tomato plants.
Thus, the farmer can get 300 x 20 = <<300*20=6000>>6000 pieces of tomatoes.
#### 6000