How much of a shed can be framed using 2x4 lumber?
You can frame a whole house with nothing but 2x4, but it's easier to do a shed, as you won't need engineering, probably.

The secret word is truss. You can use them for roof, floor and even wall framing, but few sheds will need trusses for walls. While you certainly could get the whole thing engineered, you can probably just copy a standard truss design and come out strong enough, if you pay attention to things like which side is up. It's a shed, so the world won't end if you get it wrong, but it's not hard to get right enough at the usual scale that's called shed. You can also build up to a certain size/loading (those interact) without making trusses, unless you have an overbearing local jurisdiction. Storing a push mower and some garden tools is different than parking a big riding mower and 15 tool boxes of wrenches...

A table in a farm construction book I happen to have ( Mechanics in Agriculture, by Lloyd Phipps) lists rafter spans for dressed 2x4's in various species ranging from 5 feet 9 inches in the weakest species group (being basswood and cottonwood, unlikely) on 24" centers to 10 feet 11 inches in the strongest species group on 12" centers. 

The admittedly engineered and not home-built trusses on my shop span 24 feet on 2 foot centers and are entirely made of 2x4's.