how to count this values?
I have several lines such as this :

    AAAAAABBBBDDDAAADDSSDD,FLAGE=TRUE,LLUUGJYFR
    TTT:1
    TTT:2
    AAAAAABBBBDDDAAADDSSDD,FLAGE=TRUE,YYTTREETU,YTTREFF
    TTT:1
    AAAAAABBBBDDDAAADDSSDD,FLAGE=TRUE,KKIFRDEEW,YTRFHFFD
    TTT:1
    TTT:2
    TTT:3
    TTT:4
    AAAAAABBBBDDDAAADDSSDD,FLAGE=FALSE,TYYRFFGGGFD,JJUUGGGGF
    TTT:1
    TTT:2
    AAAAAABBBBDDDAAADDSSDD,FLAGE=TRUE,KKYGG,GGRFFFF,KUUYFFF
    TTT:1

I want to count TTT and FLAG=TRUE if the FLAG=TRUE
how can I check it ?
thanks for your help
how to count this values?
===

I have several lines such as this :

    AAAAAABBBBDDDAAADDSSDD,FLAGE=TRUE,LLUUGJYFR
    TTT:1
    TTT:2
    AAAAAABBBBDDDAAADDSSDD,FLAGE=TRUE,YYTTREETU,YTTREFF
    TTT:1
    AAAAAABBBBDDDAAADDSSDD,FLAGE=TRUE,KKIFRDEEW,YTRFHFFD
    TTT:1
    TTT:2
    TTT:3
    TTT:4
    AAAAAABBBBDDDAAADDSSDD,FLAGE=FALSE,TYYRFFGGGFD,JJUUGGGGF
    TTT:1
    TTT:2
    AAAAAABBBBDDDAAADDSSDD,FLAGE=TRUE,KKYGG,GGRFFFF,KUUYFFF
    TTT:1

I want to count TTT and FLAG=TRUE if the FLAG=TRUE
how can I check it ?
thanks for your help