The answer is 21 because...
First I noticed that the triangle was 2 smaller than the square, because of the first clue. The first clue = notice that the horizontal row had two triangles and two square (meaning that each of those numbers had to be even), adding up to 28. Comparing to the Vertical row (which added up to 30 (2 more than the horizontal line), had 3 squares and 1 triangle). Since I knew that the difference between the two shapes were 2, I used trial and error to find those 2 specific numbers (8 & 6).
Since I figured out the triangle and the square, I went on to the hexagon (which is 7). I figured this out by the two end columns, each had two circles and two squares, the only difference being the 1 triangle and the 1 hexagon. Noticing that the difference between the lines was 1, I realized that the hexagon was 1 more than the triangle (Hexagon = 7).
The circles were easy. I just used my knowledge of the triangle, hexagon, and square and calculated what the circles were.
Then I calculated the first column and figured out that the sum was 21 (6+7+4+4=21)