At this point I'm confused as to exactly how/what you want to count.

Based on this small sample what result do you expect:

1000	CA	CA
1000	xx	xx
10	CA	xx
750	xx	CA
100	xx	xx
10	xx	CA