you will get miles for AAA-CCC
You will need to use upgrades enough for AAA-CCC not AAA-BBB-CCC
You will not get any credit or double miles for BBB-CCC
BUT... one way to try to get miles for what you flew, is to force AA to break up the segments. One way I did this was when I got to CCC I requested an upgrade (I was in coach AAA-BBB). The Agent had to seperate the two flights and they both posted.