>>13983026Oh, I misread your question. In that case you do it by computing the Betti numbers and taking the alternating sum. The k'th Betti number B_k is simply the rank of the integral homology H_k(X).
Also your second post is wrong. You're computing the number of cells in each dimension, which is different from the betti number in each dimension.
The betti numbers of your shape are 1, 2,0 while the number of cells in each dimension are 3, 5, 1. A theorem says that these sequences will always have the same alternating sum, which is why you can compute the euler characteristic for CW complexes without computing the homology groups.