With half as many swallows as bluebirds, there are 2*2=<<2*2=4>>4 bluebirds.
With three times more cardinals than bluebirds, there are 3*4=<<3*4=12>>12 cardinals,
If there were 2 swallows, then the total number of birds in the crape myrtle tree is 2+4+12=<<2+4+12=18>>18 birds.
#### 18