How long must be the vertical leg of support brackets?
The first option would be vastly more appropriate for a heavy load. Pullout tension is inversely and exponentially proportional to the length of the mounted leg, so you'll have many times more stress on fasteners with the second option. For that matter, your backplate may not be up to the task of resisting that much torque.

As to how long the legs need to be, that depends on several things. First, what will you use to mount to the block wall? Can it handle the stress? Next, will the blocks in the wall take the stress? If you put all your anchors in the block web you're unlikely to break the blocks. If you were to anchor to the hollow cavity faces, you just might tear them out. 

Keep in mind that the length of the horizontal leg isn't as important as is the actual depth of the countertop. I'd see to have a vertical leg that's at least 50% of the counter depth. I'd also put double fasteners near the top, where the most pullout force exists. 

It's difficult to offer more specific advice without dimensions, weights, etc., but this should get you in the ballpark.