You could use the largely undocumented DATEDIF() function, parsing the yyyymm dates and comparing then to the start and end of the fiscal year.

D1:M1 contain the years (e.g. 2003, 2004, etc) with a custom number format of
"F"0.
The formula in C2 is,
=DATEDIF(DATE(LEFT(A2,4),RIGHT(A2,2),1),DATE(LEFT(B2,4),RIGHT(B2,2)+1,1),"m")
... which can be filled down. The formula in D2 is,
=IFERROR(DATEDIF(MAX(DATE(D$1,9,1),DATE(LEFT($A2,4),RIGHT($A2,2),1)),MIN(EDATE(DATE(D$1,9,1),12),DATE(LEFT($B2,4),RIGHT($B2,2),1)),"m"),0)
... which can be filled both right and down.
Please note that some unreliable results may be returned with DATEDIF(), particularly with counting days around leap years (which you are not doing). If the number of dates is absolutely mission critical, you should at least know what you are up against.
See the following,
The DATEDIF Worksheet Function
Excel - Formula Frustration