Why does current remain constant in a series circuit although the rate at which they flow deceases due to the collisions they go through? I am really confused and frustrated as I can't figure this out. If someone could clear my doubt, I'd be really thankful. 
According to my textbook current is the rate of flow of charge, it is directly proportional to voltage provided the resistance remains constant. So, when current which is basically electrons carrying electrical energy, when they pass through a resistor or lamp or any other electrical component, some electrical energy gets converted into thermal energy, so the electrical energy they carry is reduced, right? And as they pass through a component they undergo collisions with the atoms which causes their speed to reduce, they will travel slower and therefore pass through the resistor much slowly, so as its speed reduces the current should reduce? 
As current is the rate of charge, it's rate will definitely reduce due to the collisions it will go through, right? I understand that the “amount” of electrons will remain same as everyone says, but current just isn't “flowing electrons” it's the rate at which they flow, so although the amount of electrons flowing remains same, their rate of flow decreases, so isn't the current supposed to be reduced rather than remain constant? 
I could be totally wrong but I haven't  found any resource which gives me the answer to my question, everyone claims the amount of electron remains same (I agree) but no one refers to its rate. I am studying this entire chapter by myself so sorry if something I said tends to be wrong.
 A: A lot of this question seems to be a duplicate of the above questions, but this part seemed to be novel to me. 

So, when current which is basically electrons carrying electrical energy,when they pass through a resistor or lamp or any other electrical component some of the electrical energy gets converted into thermal energy,so the electrical energy they carry is reduced,right?

Actually, no, electrons do not carry the energy in a typical circuit. Instead, the energy is carried by the fields. Consider this, at typical currents the drift velocity is on the order of mm/s. If the electrons carried the energy then it would take at least several minutes between flipping a switch and a light bulb becoming energized and glowing. Instead, the fields move at nearly the speed of light, allowing the energy to travel much faster than the electrons. 

as they pass through a component they undergo collisions with the atoms which causes their speed to reduce,they will travel slower

This doesn’t happen. While they are undergoing collisions in the Drude model they are also being accelerated by the fields. The net effect is that their average speed is constant. Again, the energy is supplied by the fields, and the fields are present throughout the circuit. 
A: First, the rate at which electrons flow into the resistor must (in steady state) equal the rate at which electrons flow out of the resistor.
To see why this must be, consider the case that the flow into the resistor is greater than the flow out. If this were to happen, the number of excess electrons within the resistor would increase, i.e., the resistor would become increasingly negatively charged.
Now, what would be the effect of this building negative charge? This charge repels electrons and this would act to (1) decrease the flow of electrons into the resistor as well as (2) increase the flow of electrons out of the resistor.
In other words, if the rates into and out of the resistor were perturbed so that they don't match, the resulting build-up of electric charge within the resistor acts to make the rates equal again.
Section 7.1.2 in Griffiths' "Introduction to Electrodynamics, Fourth Edition" covers this:

Answer:  If the current were not the same all the way around (for instance, during the first split second after the switch is closed),
  then charge would be piling up somewhere and - here's the crucial
  point - the electric field of this accumulating charge is in such a
  direction as to even out the flow.
Suppose, for instance, that the current into the bend in Fig. 7.8 is
  greater than the current out. Then charge piles up at the "knee",
  and this produces a field aiming away from the kink.  This field
  opposes the current flowing in (slowing it down) and promotes the
  current flowing out (speeding it up) until these currents are equal,
  at which point there no further accumulation of charge, and
  equilibrium is established.
It's a beautiful system, automatically self-correcting to keep the
  current uniform, and it does all so quickly that, in practice, you can
  safely assume the current is the same all around the circuit.

A: Say, 10 charges flow through the wire per second, and suddenly they are slowed down at the resistor so only, say, 6 of them flow through the resistor per second. Where do the extra 4 charges per second go? They will have to wait "in queue" in front of the resistor. And every second 4 new ones arrive, so they accumulate and grow and grow in amount. 
Soon, so many will have accumulated that their total repulsion will prevent any further charges from arriving. Only when there is room, will more charges be allowed in. So only when the 6 charges flow through per second, will 6 new ones be allowed in. Effectively, the incoming flow has balanced to match the outcoming flow.
The same happens on the other side or the resistor, just oppositely with missing charges instead of an excess of charges.
This idea that at steady state - when balance has been reached - inflow must equal outflow, is called Kirchhoff's current law. 
