Math Regarding Battery Discharge
First off you can use Wh to give an ideal world, everything 100% efficient calculation.
12V, 10Ah = 120 Wh source.
3.7V, 3Ah = 11.1 Wh destination.

So if we could do things perfectly we could charge 10.8 batteries. The real world number will obviously be lower.

Charge rate will only have a minimal impact on the final system power usage, the power supplies will vary in efficiency a little with different current draws but not enough to make a huge difference in the answer.

The battery charger is a linear regulator so the current input is independent of output voltage and only depends on the output current.
So to put 1 Ah into the battery we need to take 1 Ah from the 5 V rail. This makes this stage ~74% efficient. (3.7/5 = 0.74) 

Assuming a switching power supply is used to step down from 12 V to 5 V then 1 A on the 5 volt rail will require 5/(12*e) amps from the 12 V supply where e is the efficiency of the power supply.
Since you didn't give a number for this let's go with 85% for now, the real number could be higher or lower.
So 1 A at 5 V requires 5/(12*0.85) = 0.49 A from the 12 V supply.

Which means that to put 1 Ah into your Li-Ion battery you will need to take 490 mAh from your 12 V battery.

If your 12 V battery is 10 Ah and your Li-Ion battery is 3 Ah then you should be able to charge it roughly 6.5 times.

Exact numbers will be a little bit lower due to other losses in the battery charger and the batteries themselves but these will generally be small in comparison to the impact of the factors above.