Engine mounts and thrust links
How are engines mounted onto wings?
Modern engines are hanged to the pylon struts fixed to the wings, at two mounts, using an attachment device named hanger fitting in the terminology of CFMI. This is how a CFM56-7B is mounted onto the wing of a Boeing 737 NG:

CFM56-7B on the wing of a Boeing 737 NG. Adapted from CFM56-7B nacelle training manual
The hangers are shown in red, they are fixed to the engine using links (magenta) and clevises either via the fan case fitting (forward mount, green), or directly (aft mount). Then they are fixed to the pylon / strut using bolts and shear pins.
Actual parts pictures (differences are due to improvements):

Engine fan frame fitting and aft hanger for a CFM56-7B. Source
Engine mounts have varied over years. While initially the engine thrust was carried over to the wing along the engine structure, the modern method is to avoid this as it has many disadvantages. It deforms the engine structure and prevents having reduced clearances between turbine tip and walls. This in turn leads to less than optimal engine efficiency.
On modern aircraft engines are mounted at two locations: The top of the fan frame and the top of the turbine frame. No stress is borne by other components.
Usually the forward mount (fan frame) receives both the vertical load and the thrust load and the aft mount receives the torque load. But in some cases, when the thrust load is not desirable on the front mount, thrust links are used to transfer the thrust load to the aft mount. This is the case for the Boeing 737 NG family.
Bolts and shear pins
I've heard that the engines on a commercial air transports are
typically mounted with 2 or 3 bolts.
It's a bit difficult to count, because there are intermediary parts between the engine and the wing. To simplify we can focus on the two mounts and how they actually transfer thrust to the strut. In this case you are close to the truth.
In our example, the forward mount uses four bolts and two pins, the aft mount uses four bolts and a pin. The thrust load is mostly borne by the shear pins while the bolts take the vertical loads (e.g. engine weight and torque) and ensure the overall positioning.
For other combinations engine/aircraft the principle is the same, parts are slightly different, e.g. this is the forward mount for a CFM56-5B on an Airbus A320:

CFM56-5B forward mount for A320. Source
There are 4 bolts and one shear pin (the other visible pin is for centering, and is used as a backup shear pin).
We can say the main force is transferred to the wing using 3 shear pins only, but don't forget the thrust links, and the bolts used to attach them, are part of the chain too.
Still 8 bolts are necessary to deal with other loads and to keep everything sticking together, and also to allow the shear pins to remain in place.
Bolts size and strength
How big are these bolts and what are they made of?
Bolts used for a CFM56-7B on a B737 NG have the part number BACB30PN14-32M in Boeing nomenclature. This bolt has a diameter of 22 mm (0.875") and is made of nickel alloy 718 a super alloy, also known as Inconel 718.
What bolts, barrel nuts and pins look like:
CFM56-7B aft mount. Source
The Factor of Safety on such a bolt would be nice too!
To have an idea of the forces involved it's good to know a Boeing 737 NG engine has a mass of about 2,000 kg, acting on the pylon in the form of a weight of 20 kN (mass x gravity acceleration). The engine generates about 100 kN of thrust. Even taking into account sudden vertical accelerations and hard landings (let's say 3 G), thrust is the main force acting on the pylon and the shear pins are more stressed than the bolts.
Nickel alloy 718 has a tensile strength of 180 N per mm², this gives each bolt a total strength of 70 kN. the 8 bolts together could sustain 560 kN, to be compared with the weight of the engine (20 kN) and thrust (100 kN).
The only event which can seemingly detach an engine from its pylon is a collision with the ground or the friction of the engine on the ground. In that case, the engine acts as a lever. The torque would break the bolts, and then the shear pins would freely escape from their holes.
Actual pictures
It's usually difficult to see the engines mounts when the engine is on the wing, as they are buried deep into the nacelle components. Click on the image to zoom.
Example:

Engine mounts on CFM56-7B. Picture by Kostas Makris. Source
Details of the mounts:
Example 2

CFM56-7B. Source
Details of the mounts:
Additional details of the CFM56-7B mounts, from the manual
Forward mount:

Forward mount. Source: CFM56-7B Training Manual (nacelle)
- The hanger fitting is fixed to the strut by 4 bolts and there are two shear pins to protect the bolts from shear loads.
- The hanger fitting is fixed to the fan case fitting by 3 pawl pins
- The fan case fitting is fixed by 10 bolts to the fan case
Aft mount:

Aft mount. Source: CFM56-7B Training Manual (nacelle)
- The hanger fitting is fixed to the strut using 4 bolts and barrel nuts, protected by a shear pin.
- The hanger fitting is fixed to clevisses on the turbine frame using 4 links using and 4 bolts.
Two thrust links transfer the thrust from the fan frame to the aft mount. There is an evener bar on the aft mount.