Store and isolate bad pages from a file to new file

I have a file like below . The good pages must have 3 conditions :
The pages that containing page total only must have 50 lines.
The pages that containing customer total only must have 53 lines.
The last page of Customer Total should be the last page.
How can I accomplish separating good pages from bad pages using GAWK ?
File :
-------

FFstarting good page1(50 line) Account number :    12500149 
.. 
.. 
.. 
Total of page : 5555 
FFstarting good page2(50 line) Account number :    12500149 
.. 
.. 
.. 
Total of page : 6666 
FFstarting good page3(53 line) Account number :    12500149 
.. 
.. 
.. 
Total of page : 6666 
Total Customer : 999.99 
FFstarting BAD page1(Not 50 line) Account number :    12500148 
.. 
.. 
.. 
Total of page : 5555 
FFstarting BAD page2(Not 50 line) Account number :    12500148 
.. 
.. 
.. 
Total of page : 6666 
FFstarting BAD page3(Not 53 line) Account number :    12500148 
.. 
.. 
.. 
Total of page : 6666 
Total Customer : 999.99

You store up entire pages in a variable, not passing anything, counting lines, until you see one of the total signatures, then decide on the line count where to write it. At EOF, you need to dispose of the last page from the variable.