How many flying mileage a pilot should have per year in order to keep his licence valid?
There’s no minimum flight time required to retain a pilot certificate, though there are minimum currency standards in order to act as PIC in certain flight situations, or to carry passengers.  See §61.57.

Pilots are also required to complete a Bienneal Flight Review ever 24 calendar months in order to act as PIC aboard an aircraft.  Any successful practical exam for an airman certificate additional category, class or type rating can be substituted for a BFR.

Typ ratings listed on airman certificates expire after 12 calendar months unless the applicant undergoes a recurrent training for the aircraft type and pass a practical exam administered be an aviation examiner or check airman.

Flight instructor certificates do expire after 24 calendar months, unless the CFI:


Passes a flight instructor refresher course containing both ground and flight training within the preceding 3 calendar months on the expiration date.
Pass a practice exam for one of the ratings listed on their instructor certificate
Recommends at least 5 students to take a practical examination in which 80% of whom pass, or 
Work as a chief pilot or check airman for a Part 121 or 135 operation.


See §61.197