A few years back I heard at biology class that sugar's molecule consists of half the number of elements of a glucose molecule. So not counting the energy needed to transform two sugar molecules in one glucose molecule, isn't it almost the same (eating N amount of sugar) as eating N/2 of glucose?
You have it backwards. One sugar molecule is equivalent to two glucose molecules, though the actual structure of sugar (Sucrose) is a Glucose + Fructose combination.
While Glucose is metabolized via Glycolysis into two molecules of Pyruvate (which are then used in the Citric Acid Cycle), Fructose enters the Glycolysis metabolism at a later stage as shown here:
The GA-3-P is then turned into 2-Phosphoglycerate and then into 2x Pyruvate.
The end result is that a single Sucrose molecule (Glucose + Fructose) [aka - Sugar] is equivalent to 4x Pyruvate, whereas Glucose alone is equivalent to 2x Pyruvate. Or, if you prefer, a single Glucose molecule results in about 32-36 ATP produced, whereas Sucrose will result in 64-72 ATP produced - with ATP being the primary energy carrier of the cell.
Is consuming sugar with food as beneficial as consuming glucose (~half of the amount of sugar)?
What is referred to in everyday language as "sugar" is sucrose. Each sucrose molecule consists of one glucose molecule and one fructose molecule linked by a chemical bond. These two, glucose and fructose are, in terms of energy value, identical.
Whether they are equally beneficial, or indeed beneficial at all (from a nutritional point of view), is a very big question.
P.S. (in response to MCM):
But... fructose metabolism is largely carried out by the liver. If you are consuming sucrose then the glucose component will raise insulin levels and the liver will be in anabolic mode. The fructose will be converted to liver glycogen via glucose-6-phosphate (as shown in your diagram) and also to triglyceride for export to adipose tissue where it is stored as fat. So the energy yield from fructose will be deferred, whereas the glucose will be used by all tissues immediately.
Later on, as insulin levels fall (and glucagon levels rise) the liver glycogen will be mobilised as glucose for export to other tissues. Some of the triglyceride will be mobilised from the adipose tissue for use as fuel too, but it is widely believed that with a typical Western diet there is a net movement from fructose>fat which contributes to the rise in levels of obesity. Indeed some scientists believe that fructose is the main culprit.